diff options
author | Marc Glisse <marc.glisse@inria.fr> | 2022-04-08 18:25:32 +0200 |
---|---|---|
committer | Marc Glisse <marc.glisse@inria.fr> | 2022-04-08 18:25:32 +0200 |
commit | 7b7d71e3a8d1302dc81eb020114fe4c4d767ccb0 (patch) | |
tree | e53b8745bbda24f9d0ccdce63fbe11e538717f5b /src/python/gudhi/simplex_tree.pyx | |
parent | b28c83f63ca5d6437fa0a234ad3a1be692f07999 (diff) |
name argument, assert message
Diffstat (limited to 'src/python/gudhi/simplex_tree.pyx')
-rw-r--r-- | src/python/gudhi/simplex_tree.pyx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/python/gudhi/simplex_tree.pyx b/src/python/gudhi/simplex_tree.pyx index 43461e02..1ac03afa 100644 --- a/src/python/gudhi/simplex_tree.pyx +++ b/src/python/gudhi/simplex_tree.pyx @@ -244,7 +244,7 @@ cdef class SimplexTree: the filtration values are encoded in the array, with the diagonal representing the vertices. It is the caller's responsibility to ensure that this defines a filtration, which can be achieved with either:: - filtrations[np.diag_indices_from(filtrations)] = filtrations.min(1) + filtrations[np.diag_indices_from(filtrations)] = filtrations.min(axis=1) or:: @@ -263,7 +263,7 @@ cdef class SimplexTree: cdef double[:,:] F = filtrations ret = SimplexTree() cdef int n = F.shape[0] - assert n == F.shape[1] + assert n == F.shape[1], 'create_from_array() expects a square array' with nogil: ret.get_ptr().insert_matrix(&F[0,0], n, F.strides[0], F.strides[1], max_filtration) return ret @@ -301,7 +301,7 @@ cdef class SimplexTree: """ cdef Py_ssize_t k = vertex_array.shape[0] cdef Py_ssize_t n = vertex_array.shape[1] - assert filtrations.shape[0] == n + assert filtrations.shape[0] == n, 'inconsistent sizes for vertex_array and filtrations' cdef Py_ssize_t i cdef Py_ssize_t j cdef vector[int] v |