This MR updates the usage points of several deprecated features of our dependencies.
ndimage.filters
and ndimage.morphology
have been deprecated for a whilenp.trapz
is replaced by np.trapezoid
in numpy 2.0 (https://numpy.org/doc/stable/numpy_2_0_migration_guide.html#main-namespace)pathlib
a long time ago
(https://docs.pytest.org/en/latest/deprecations.html#fspath-argument-for-node-constructors-replaced-with-pathlib-path
and
https://docs.pytest.org/en/latest/deprecations.html#py-path-local-arguments-for-hooks-replaced-with-pathlib-path)MatplotlibDeprecationWarning: Auto-close()ing of figures upon backend switching is deprecated since 3.8 and will be removed two minor releases later. To suppress this warning, explicitly call plt.close('all') first.
by closing all open figures before and after any notebook runMaybe (just maybe) the closing of figures also fixes this spurious error:
FAILED tests/test_stokes_setup.ipynb::test_stokes_setup.ipynb - TypeError: Axes3D.quiver() missing 4 required positional arguments: 'Z', 'U', 'V', and 'W'
for which I still could not pin down the cause.