Describe the bug
CI tests are currently failing, because np.trapz and np.in1d, used within nectarchain, are expired deprecations in numpy >=2.4.0 (see e.g. https://numpy.org/devdocs/release/2.4.0-notes.html#removal-of-deprecated-functions-and-arguments and https://numpy.org/devdocs/release/2.4.0-notes.html#removed-numpy-in1d).
To Reproduce
Open a pull request and contemplate the CI tests failing with errors like:
=========================== short test summary info ============================
FAILED src/nectarchain/makers/component/tests/test_flatfield_spe_component.py::TestFlatFieldSingleNominalSPENectarCAMComponent::test_finish_multiproc - AttributeError: module 'numpy' has no attribute 'trapz'
FAILED src/nectarchain/makers/component/tests/test_flatfield_spe_component.py::TestFlatFieldSingleNominalSPENectarCAMComponent::test_finish_singleproc - AttributeError: module 'numpy' has no attribute 'trapz'
Expected behavior
CI tests should not fail for such reasons.
Possible solution
It should be straightforward to update calls to np.trapz to np.trapezoid, without the need to pin numpy to versions <2.4.0 in our recipes. The same applies to np.in1d, to be replaced by np.isin.
Supporting information
See e.g. the results of the following action: https://github.com/cta-observatory/nectarchain/actions/runs/22218928329/job/64269252257
Additional context
numpy has been announcing the deprecation of np.trapz and np.in1d since 2023 (https://numpy.org/devdocs/release/2.4.0-notes.html#removal-of-deprecated-functions-and-arguments and https://numpy.org/devdocs/release/2.4.0-notes.html#removed-numpy-in1d).
Several open PR are currently affected, e.g.:
Describe the bug
CI tests are currently failing, because
np.trapzandnp.in1d, used withinnectarchain, are expired deprecations innumpy >=2.4.0(see e.g. https://numpy.org/devdocs/release/2.4.0-notes.html#removal-of-deprecated-functions-and-arguments and https://numpy.org/devdocs/release/2.4.0-notes.html#removed-numpy-in1d).To Reproduce
Open a pull request and contemplate the CI tests failing with errors like:
Expected behavior
CI tests should not fail for such reasons.
Possible solution
It should be straightforward to update calls to
np.trapztonp.trapezoid, without the need to pinnumpyto versions <2.4.0 in our recipes. The same applies tonp.in1d, to be replaced bynp.isin.Supporting information
See e.g. the results of the following action: https://github.com/cta-observatory/nectarchain/actions/runs/22218928329/job/64269252257
Additional context
numpyhas been announcing the deprecation ofnp.trapzandnp.in1dsince 2023 (https://numpy.org/devdocs/release/2.4.0-notes.html#removal-of-deprecated-functions-and-arguments and https://numpy.org/devdocs/release/2.4.0-notes.html#removed-numpy-in1d).Several open PR are currently affected, e.g.: