From 7b7d71e3a8d1302dc81eb020114fe4c4d767ccb0 Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Fri, 8 Apr 2022 18:25:32 +0200 Subject: name argument, assert message --- src/python/gudhi/simplex_tree.pyx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/python/gudhi/simplex_tree.pyx') 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 -- cgit v1.2.3