diff options
author | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2021-11-08 10:47:09 +0100 |
---|---|---|
committer | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2021-11-08 10:47:09 +0100 |
commit | d670769d113c7621d2260ac08c2961dd73ce8cb4 (patch) | |
tree | f4080ecfda544a2c4062d9ca24e4091cf6ea48ea /src/python/gudhi/periodic_cubical_complex.pyx | |
parent | 11b8a288946c953472165ffbb5dbfbeb5ca64d26 (diff) | |
parent | cfb60a50a7c3aea08abc41118fbfdf31061a44a4 (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.pyx | 6 |
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 |