Skip to content

community/py3-chaospy: fix tests with numpy 2.0

mio requested to merge mio/aports:py3-chaospy into master

Update numpy ptp reference to fix failed tests. Error found during rebuild on 3.21 builders (error log).

            if estimator_rule in ("scott", "silverman"):
>               qrange = numpy.quantile(samples, [0.25, 0.75], axis=1).ptp(axis=0)
E               AttributeError: `ptp` was removed from the ndarray class in NumPy 2.0. Use np.ptp(arr, ...) instead.

chaospy/distributions/kernel/baseclass.py:51: AttributeError

Faild tests:

FAILED tests/distributions/kernel/test_gaussian_kde.py::test_gaussian_kde_1d_integration
FAILED tests/distributions/kernel/test_gaussian_kde.py::test_gaussian_kde_2d_integration
FAILED tests/distributions/kernel/test_gaussian_kde.py::test_gaussian_kde_rotation

Merge request reports

Loading