summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarc Glisse <marc.glisse@inria.fr>2022-11-08 22:36:16 +0100
committerMarc Glisse <marc.glisse@inria.fr>2022-11-08 22:36:16 +0100
commit7c17408897a95a1f74626e8ff0ec8101ac4f92fd (patch)
treea4e3b9f429ec1f02fafc5d5dfa318f89dd349ee2 /src
parent8804aa1580c500ed927d65c25e8b78700725338e (diff)
Reject positional arguments in RipsComplex.__init__
Diffstat (limited to 'src')
-rw-r--r--src/python/gudhi/rips_complex.pyx4
-rwxr-xr-xsrc/python/test/test_simplex_generators.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/python/gudhi/rips_complex.pyx b/src/python/gudhi/rips_complex.pyx
index a0924cd6..d748f91e 100644
--- a/src/python/gudhi/rips_complex.pyx
+++ b/src/python/gudhi/rips_complex.pyx
@@ -41,7 +41,7 @@ cdef class RipsComplex:
cdef Rips_complex_interface thisref
# Fake constructor that does nothing but documenting the constructor
- def __init__(self, points=None, distance_matrix=None,
+ def __init__(self, *, points=None, distance_matrix=None,
max_edge_length=float('inf'), sparse=None):
"""RipsComplex constructor.
@@ -64,7 +64,7 @@ cdef class RipsComplex:
"""
# The real cython constructor
- def __cinit__(self, points=None, distance_matrix=None,
+ def __cinit__(self, *, points=None, distance_matrix=None,
max_edge_length=float('inf'), sparse=None):
if sparse is not None:
if distance_matrix is not None:
diff --git a/src/python/test/test_simplex_generators.py b/src/python/test/test_simplex_generators.py
index 8a9b4844..c567d4c1 100755
--- a/src/python/test/test_simplex_generators.py
+++ b/src/python/test/test_simplex_generators.py
@@ -14,7 +14,7 @@ import numpy as np
def test_flag_generators():
pts = np.array([[0, 0], [0, 1.01], [1, 0], [1.02, 1.03], [100, 0], [100, 3.01], [103, 0], [103.02, 3.03]])
- r = gudhi.RipsComplex(pts, max_edge_length=4)
+ r = gudhi.RipsComplex(points=pts, max_edge_length=4)
st = r.create_simplex_tree(max_dimension=50)
st.persistence()
g = st.flag_persistence_generators()