In the Nixkgs collection we see test failures on the build system with Python 3.10 and Python 3.11.
Executing pytestCheckPhase
============================= test session starts ==============================
platform linux -- Python 3.10.9, pytest-7.2.0, pluggy-1.0.0
rootdir: /build/persim-0.3.1
collected 104 items / 12 deselected / 92 selected
test/test_distances.py .............................. [ 32%]
test/test_landscapes.py ...........................F [ 63%]
[...]
=================================== FAILURES ===================================
____________________ TestTransformer.test_persistenceimager ____________________
self = <test_landscapes.TestTransformer object at 0x7fff83f6ec50>
def test_persistenceimager(self):
pl = PersistenceLandscaper(hom_deg=0, num_steps=5, flatten=True)
assert pl.hom_deg == 0
assert not pl.start
assert not pl.stop
assert pl.num_steps == 5
assert pl.flatten
dgms = [np.array([[0, 3], [1, 4]]), np.array([[1, 4]])]
pl.fit(dgms)
assert pl.start == 0
assert pl.stop == 4.0
np.testing.assert_array_equal(
pl.transform(dgms),
np.array([0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0,]),
)
pl2 = PersistenceLandscaper(hom_deg=1, num_steps=4)
assert pl2.hom_deg == 1
pl2.fit(dgms)
assert pl2.start == 1.0
assert pl2.stop == 4.0
np.testing.assert_array_equal(pl2.transform(dgms), [[0.0, 1.0, 1.0, 0.0]])
pl3 = PersistenceLandscaper(hom_deg=0, num_steps=5, flatten=True)
np.testing.assert_array_equal(
> pl3.fit_transform(dgms),
np.array([0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0,]),
)
test/test_landscapes.py:532:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/nix/store/avaqkdjpx2w50dgyq9769fa3ghvr8cvx-python3.10-scikit-learn-1.2.1/lib/python3.10/site-packages/sklearn/utils/_set_output.py:142: in wrapped
data_to_wrap = f(self, X, *args, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = PersistenceLandscaper(hom_deg=0, start=0, stop=4, num_steps=5)
dgms = [array([[0, 3],
[1, 4]]), array([[1, 4]])]
def fit_transform(self, dgms):
self.fit(dgms=dgms)
> vals = self.transform(dgms=dgms)
E TypeError: PersistenceLandscaper.transform() missing 1 required positional argument: 'X'
persim/landscapes/transformer.py:132: TypeError
=============================== warnings summary ===============================
../../nix/store/sgaywpksqi4iqq1b148hagzcbmwpwzbm-python3.10-joblib-1.2.0/lib/python3.10/site-packages/joblib/backports.py:22
/nix/store/sgaywpksqi4iqq1b148hagzcbmwpwzbm-python3.10-joblib-1.2.0/lib/python3.10/site-packages/joblib/backports.py:22:
[...]
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED test/test_landscapes.py::TestTransformer::test_persistenceimager - TypeError: PersistenceLandscaper.transform() missing 1 required positional ...
=========== 1 failed, 91 passed, 12 deselected, 11 warnings in 3.24s ===========