Closed rapoliveira closed 7 months ago
The above one is easy.
Though, I see you also changed integrate.simps
to integrate.simpson
. Did scipy just change the name of the function? If so, then do you know when?
The main part done in 62d83c1.
This DeprecationWarning also appeared in the automated tests:
DeprecationWarning: 'scipy.integrate.simps' is deprecated in favour of 'scipy.integrate.simpson' and will be removed in SciPy 1.14.0
I found that integrate.simpson
was added in version 1.11.0 and integrate.simps
will be removed in the next SciPy minor release.
Please add an if statement that decides which function to use based on scipy.__version__
and then this function is used.
Done! Based on the discussion in commit fe58801, I added a try-except block instead.
except AttributeError
instead of only except
to avoid Flake8(E722) warningsimps
was renamed to simpson
in v1.7.0 documentation and will soon be disabledThanks. Suggestion: never use bare except. Reason: the code cannot be killed by Ctrl-C etc.
The automated tests using NumPy >= v1.25 present this DeprecationWarning:
The release notes from NumPy explains the change, which is related to not treating arrays of size 1 as scalars anymore.
Changing
magnification
tomagnification[0]
in test_BLPS_shear_active() solves it. I will do it!