diff options
author | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2021-11-04 17:26:04 +0100 |
---|---|---|
committer | Vincent Rouvreau <vincent.rouvreau@inria.fr> | 2021-11-04 17:26:04 +0100 |
commit | 7c26436a703a476d28cf568949275d26d1827c36 (patch) | |
tree | 6a3b94691aa5444e1a32351df7cea789b1a81914 /src/python/gudhi/simplex_tree.pyx | |
parent | a2761c01ceb26a057b94be1d45433335704c1581 (diff) |
code review: use len instead of .shape[0]
Diffstat (limited to 'src/python/gudhi/simplex_tree.pyx')
-rw-r--r-- | src/python/gudhi/simplex_tree.pyx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/python/gudhi/simplex_tree.pyx b/src/python/gudhi/simplex_tree.pyx index e9bac036..c3720936 100644 --- a/src/python/gudhi/simplex_tree.pyx +++ b/src/python/gudhi/simplex_tree.pyx @@ -543,10 +543,9 @@ cdef class SimplexTree: assert self.pcohptr != NULL, "compute_persistence() must be called before persistence_intervals_in_dimension()" piid = np.array(self.pcohptr.intervals_in_dimension(dimension)) # Workaround https://github.com/GUDHI/gudhi-devel/issues/507 - if piid.shape[0] == 0: + if len(piid) == 0: return np.empty(shape = [0, 2]) - else: - return piid + return piid def persistence_pairs(self): """This function returns a list of persistence birth and death simplices pairs. |