summaryrefslogtreecommitdiff
path: root/src/python/test/test_sklearn_cubical_persistence.py
diff options
context:
space:
mode:
authorROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-06-01 19:12:50 +0200
committerROUVREAU Vincent <vincent.rouvreau@inria.fr>2021-06-01 19:12:50 +0200
commit4a64eef12722de3faa8ac73416aaea91658e20b6 (patch)
treeed0c155822ae5e37398f3b528165bf895826b96e /src/python/test/test_sklearn_cubical_persistence.py
parent5b75186ace327ddc17eb6f06c0ba2485c93235ec (diff)
Add cubical scikit learn interface documentation and example
Diffstat (limited to 'src/python/test/test_sklearn_cubical_persistence.py')
-rw-r--r--src/python/test/test_sklearn_cubical_persistence.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/python/test/test_sklearn_cubical_persistence.py b/src/python/test/test_sklearn_cubical_persistence.py
index 134611c9..c0082547 100644
--- a/src/python/test/test_sklearn_cubical_persistence.py
+++ b/src/python/test/test_sklearn_cubical_persistence.py
@@ -20,7 +20,7 @@ def test_simple_constructor_from_top_cells():
cells = datasets.load_digits().images[0]
cp = CubicalPersistence(persistence_dim = 0)
np.testing.assert_array_equal(cp._CubicalPersistence__transform(cells),
- np.array([[0., 6.], [0., 8.]]))
+ np.array([[0., 6.], [0., 8.], [ 0., np.inf]]))
def test_simple_constructor_from_top_cells_list():
digits = datasets.load_digits().images[:10]
@@ -29,8 +29,4 @@ def test_simple_constructor_from_top_cells_list():
diags = cp.fit_transform(digits)
assert len(diags) == 10
np.testing.assert_array_equal(diags[0],
- np.array([[0., 6.], [0., 8.]]))
-
-# from gudhi.representations import PersistenceImage
-# pi = PersistenceImage(bandwidth=50, weight=lambda x: x[1]**2, im_range=[0,256,0,256], resolution=[20, 20])
-# pi.fit_transform(diags) \ No newline at end of file
+ np.array([[0., 6.], [0., 8.], [ 0., np.inf]]))