summaryrefslogtreecommitdiff
path: root/src/python/gudhi/periodic_cubical_complex.pyx
diff options
context:
space:
mode:
authorVincent Rouvreau <vincent.rouvreau@inria.fr>2021-11-08 10:47:09 +0100
committerVincent Rouvreau <vincent.rouvreau@inria.fr>2021-11-08 10:47:09 +0100
commitd670769d113c7621d2260ac08c2961dd73ce8cb4 (patch)
treef4080ecfda544a2c4062d9ca24e4091cf6ea48ea /src/python/gudhi/periodic_cubical_complex.pyx
parent11b8a288946c953472165ffbb5dbfbeb5ca64d26 (diff)
parentcfb60a50a7c3aea08abc41118fbfdf31061a44a4 (diff)
Merge master and resolve conflicts (mainly src/python/CMakeLists.txt)
Diffstat (limited to 'src/python/gudhi/periodic_cubical_complex.pyx')
-rw-r--r--src/python/gudhi/periodic_cubical_complex.pyx6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/python/gudhi/periodic_cubical_complex.pyx b/src/python/gudhi/periodic_cubical_complex.pyx
index ef1d3080..6c21e902 100644
--- a/src/python/gudhi/periodic_cubical_complex.pyx
+++ b/src/python/gudhi/periodic_cubical_complex.pyx
@@ -280,4 +280,8 @@ cdef class PeriodicCubicalComplex:
launched first.
"""
assert self.pcohptr != NULL, "compute_persistence() must be called before persistence_intervals_in_dimension()"
- return np.array(self.pcohptr.intervals_in_dimension(dimension))
+ piid = np.array(self.pcohptr.intervals_in_dimension(dimension))
+ # Workaround https://github.com/GUDHI/gudhi-devel/issues/507
+ if len(piid) == 0:
+ return np.empty(shape = [0, 2])
+ return piid