summaryrefslogtreecommitdiff
path: root/src/python/example
diff options
context:
space:
mode:
authorHind Montassif <hind.montassif@gmail.com>2021-05-05 13:58:30 +0200
committerHind Montassif <hind.montassif@gmail.com>2021-05-05 13:58:30 +0200
commit2b694f9beae0e5fa78ae5b8923e7f2905c58777f (patch)
tree7b3c874390fde4c93abce181f199290edae6e73f /src/python/example
parentd68ddc94bd82c48a4433ae0b3b1b3f10c167ed0b (diff)
Add __init__ files at every level in modules
Remove last modules level and add sample type argument Rename num_points to n_samples
Diffstat (limited to 'src/python/example')
-rw-r--r--src/python/example/alpha_complex_from_generated_points_on_sphere_example.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/python/example/alpha_complex_from_generated_points_on_sphere_example.py b/src/python/example/alpha_complex_from_generated_points_on_sphere_example.py
index 2b023bbe..e73584d3 100644
--- a/src/python/example/alpha_complex_from_generated_points_on_sphere_example.py
+++ b/src/python/example/alpha_complex_from_generated_points_on_sphere_example.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-from gudhi.datasets.generators.points import sphere
+from gudhi.datasets.generators import points
from gudhi import AlphaComplex
@@ -22,11 +22,10 @@ print("#####################################################################")
print("AlphaComplex creation from generated points on sphere")
-# Generate a circle: 50 points; dim 2; radius 1
-points = sphere.generate_random_points(50, 2, 1)
+gen_points = points.sphere(n_samples = 50, dim = 2, radius = 1, sample = "random")
# Create an alpha complex
-alpha_complex = AlphaComplex(points=points)
+alpha_complex = AlphaComplex(points = gen_points)
simplex_tree = alpha_complex.create_simplex_tree()
result_str = 'Alpha complex is of dimension ' + repr(simplex_tree.dimension()) + ' - ' + \