diff options
author | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-12-08 16:35:48 +0100 |
---|---|---|
committer | ROUVREAU Vincent <vincent.rouvreau@inria.fr> | 2020-12-08 16:35:48 +0100 |
commit | 366813c651d871c5b95d9bc8e7ea227f8015fc55 (patch) | |
tree | e7bb366ed3b92639192dbb89e73bf18fdb0ae1e1 /src/python | |
parent | 55e2b2e55bc50a7cfea9ca1edfca632488cf016a (diff) |
rollback test_representation and a CGAL condition to launch it
Diffstat (limited to 'src/python')
-rw-r--r-- | src/python/CMakeLists.txt | 2 | ||||
-rwxr-xr-x | src/python/test/test_representations.py | 10 |
2 files changed, 2 insertions, 10 deletions
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 56b6876c..4dca3908 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -504,7 +504,7 @@ if(PYTHONINTERP_FOUND) endif() # Representations - if(SKLEARN_FOUND AND MATPLOTLIB_FOUND) + if(SKLEARN_FOUND AND MATPLOTLIB_FOUND AND NOT CGAL_VERSION VERSION_LESS 4.11.0) add_gudhi_py_test(test_representations) endif() diff --git a/src/python/test/test_representations.py b/src/python/test/test_representations.py index 8ebd7888..43c914f3 100755 --- a/src/python/test/test_representations.py +++ b/src/python/test/test_representations.py @@ -41,15 +41,7 @@ def test_multiple(): assert d1 == pytest.approx(d2) assert d3 == pytest.approx(d2, abs=1e-5) # Because of 0 entries (on the diagonal) d1 = pairwise_persistence_diagram_distances(l1, l2, metric="wasserstein", order=2, internal_p=2) - mode = "" - try: - import ot - mode = "pot" - except ImportError: - print("POT is not available, try with hera") - mode = "hera" - - d2 = WassersteinDistance(order=2, internal_p=2, mode=mode, n_jobs=4).fit(l2).transform(l1) + d2 = WassersteinDistance(order=2, internal_p=2, n_jobs=4).fit(l2).transform(l1) print(d1.shape, d2.shape) assert d1 == pytest.approx(d2, rel=0.02) |