summaryrefslogtreecommitdiff
path: root/src/python/doc/alpha_complex_user.rst
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-03-24 15:27:11 +0100
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-03-24 15:27:11 +0100
commit77e577eb28ca7622553cd0527db76d46b473c445 (patch)
tree74c279ec1b90292a2df33dbe7a4dca0a6673af71 /src/python/doc/alpha_complex_user.rst
parent0f19f5ecd180ac92458d5257696f1f367de54ca8 (diff)
Remove read_weights and depreciate off_file
Diffstat (limited to 'src/python/doc/alpha_complex_user.rst')
-rw-r--r--src/python/doc/alpha_complex_user.rst8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/python/doc/alpha_complex_user.rst b/src/python/doc/alpha_complex_user.rst
index f59f69e7..2b4b75cf 100644
--- a/src/python/doc/alpha_complex_user.rst
+++ b/src/python/doc/alpha_complex_user.rst
@@ -243,7 +243,8 @@ The output is:
Example from OFF file
^^^^^^^^^^^^^^^^^^^^^
-This example builds the alpha complex from 300 random points on a 2-torus, given by an `OFF file <fileformats.html#off-file-format>`_.
+This example builds the alpha complex from 300 random points on a 2-torus, given by an
+`OFF file <fileformats.html#off-file-format>`_.
Then, it computes the persistence diagram and displays it:
@@ -252,8 +253,9 @@ Then, it computes the persistence diagram and displays it:
import matplotlib.pyplot as plt
import gudhi as gd
- ac = gd.AlphaComplex(off_file=gd.__root_source_dir__ + '/data/points/tore3D_300.off')
- stree = ac.create_simplex_tree()
+ off_file = gd.__root_source_dir__ + '/data/points/tore3D_300.off'
+ points = gd.read_points_from_off_file(off_file = off_file)
+ stree = gd.AlphaComplex(points = points).create_simplex_tree()
dgm = stree.persistence()
gd.plot_persistence_diagram(dgm, legend = True)
plt.show()