iris
iris copied to clipboard
Resolve numpy deprecation: array conversion into scalar.
📰 Custom Issue
Written up from #5465.
This occurs only in tests, warnings copied below.
lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py::Test_make_coord::test_derived_points
lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py::Test_make_coord::test_derived_points_with_bounds
lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py::Test_make_coord::test_derived_points_with_bounds
lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py::Test_make_coord::test_no_depth
lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py::Test_make_coord::test_no_depth_c
lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py::Test_make_coord::test_no_eta
lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py::Test_make_coord::test_no_sigma
lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py:185: DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
nsigma_slice = slice(0, nsigma)