diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-01-14 14:40:41 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-01-14 14:40:41 +0100 |
commit | 587a845289a4e29014f67d4c3379b2b4d6b1f102 (patch) | |
tree | 6a43e1ce25342d9707db2362c9577dd680845b1d /src/python/gudhi/periodic_cubical_complex.pyx | |
parent | 88c30209fe58d29d24d5bba3c137cd5e5def29c5 (diff) |
print errors to stderr
Diffstat (limited to 'src/python/gudhi/periodic_cubical_complex.pyx')
-rw-r--r-- | src/python/gudhi/periodic_cubical_complex.pyx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/python/gudhi/periodic_cubical_complex.pyx b/src/python/gudhi/periodic_cubical_complex.pyx index b5dece10..4ec06524 100644 --- a/src/python/gudhi/periodic_cubical_complex.pyx +++ b/src/python/gudhi/periodic_cubical_complex.pyx @@ -7,11 +7,13 @@ # Modification(s): # - YYYY/MM Author: Description of the modification +from __future__ import print_function from cython cimport numeric from libcpp.vector cimport vector from libcpp.utility cimport pair from libcpp.string cimport string from libcpp cimport bool +import sys import os import numpy as np @@ -95,12 +97,12 @@ cdef class PeriodicCubicalComplex: if os.path.isfile(perseus_file): self.thisptr = new Periodic_cubical_complex_base_interface(str.encode(perseus_file)) else: - print("file " + perseus_file + " not found.") + print("file " + perseus_file + " not found.", file=sys.stderr) else: print("CubicalComplex can be constructed from dimensions, " "top_dimensional_cells and periodic_dimensions, or from " "top_dimensional_cells and periodic_dimensions or from " - "a Perseus-style file name.") + "a Perseus-style file name.", file=sys.stderr) def __dealloc__(self): if self.thisptr != NULL: @@ -209,5 +211,5 @@ cdef class PeriodicCubicalComplex: intervals_result = self.pcohptr.intervals_in_dimension(dimension) else: print("intervals_in_dim function requires persistence function" - " to be launched first.") + " to be launched first.", file=sys.stderr) return np.array(intervals_result) |