summaryrefslogtreecommitdiff
path: root/src/python/gudhi/alpha_complex.pyx
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-06-05 18:23:02 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2020-06-05 18:23:02 +0200
commit58cb456a33b4eec8ecc926457668d7d77d6662c3 (patch)
treea52c590227f6f34980bec59866468377fa8a84b0 /src/python/gudhi/alpha_complex.pyx
parentc8f5c9fc0691c8539ca164805f34554227061ba7 (diff)
Code review: 'fast' class attribute was not necessary and redundant with C++ class attribute
Diffstat (limited to 'src/python/gudhi/alpha_complex.pyx')
-rw-r--r--src/python/gudhi/alpha_complex.pyx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/python/gudhi/alpha_complex.pyx b/src/python/gudhi/alpha_complex.pyx
index 80e54da0..3855f1ac 100644
--- a/src/python/gudhi/alpha_complex.pyx
+++ b/src/python/gudhi/alpha_complex.pyx
@@ -54,7 +54,6 @@ cdef class AlphaComplex:
"""
cdef Alpha_complex_interface * this_ptr
- cdef bool fast
cdef bool exact
# Fake constructor that does nothing but documenting the constructor
@@ -76,13 +75,13 @@ cdef class AlphaComplex:
# The real cython constructor
def __cinit__(self, points = None, off_file = '', complexity = 'safe'):
assert complexity in ['fast', 'safe', 'exact'], "Alpha complex complexity can only be 'fast', 'safe' or 'exact'"
- self.fast = complexity == 'fast'
+ cdef bool fast = complexity == 'fast'
self.exact = complexity == 'safe'
cdef vector[vector[double]] pts
if off_file:
if os.path.isfile(off_file):
- self.this_ptr = new Alpha_complex_interface(off_file.encode('utf-8'), self.fast, True)
+ self.this_ptr = new Alpha_complex_interface(off_file.encode('utf-8'), fast, True)
else:
print("file " + off_file + " not found.")
else:
@@ -91,7 +90,7 @@ cdef class AlphaComplex:
points=[]
pts = points
with nogil:
- self.this_ptr = new Alpha_complex_interface(pts, self.fast)
+ self.this_ptr = new Alpha_complex_interface(pts, fast)
def __dealloc__(self):
if self.this_ptr != NULL: