Skip to content

Commit 9598dc3

Browse files
Lock file updates plus NumPy 2.4 fix in derived coord tests (#6876)
* Updated environment lockfiles * Adapt tests for NumPy 2.4 scalar conversion - numpy/numpy#29841 . --------- Co-authored-by: Lockfile bot <[email protected]>
1 parent c205c2c commit 9598dc3

File tree

5 files changed

+163
-160
lines changed

5 files changed

+163
-160
lines changed

docs/src/whatsnew/latest.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ This document explains the changes made to Iris for this release
9090
#. `@trexfeathers`_ and `@hdyson`_ updated ``_ff_replacement.py`` to clarify
9191
that Iris supports Ancillaries. (:pull:`6792`)
9292

93+
#. `@trexfeathers`_ adapted ``test_OceanSigmaZFactory`` for NumPy 2.4 - only
94+
0-dimensional arrays can now be converted to scalars. (:pull:`6876`)
95+
9396

9497
.. comment
9598
Whatsnew author names (@github name) in alphabetical order. Note that,

lib/iris/tests/unit/aux_factory/test_OceanSigmaZFactory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def coord_dims(coord):
179179

180180
@staticmethod
181181
def derive(sigma, eta, depth, depth_c, nsigma, zlev, coord=True):
182-
nsigma_slice = slice(0, int(nsigma))
182+
nsigma_slice = slice(0, nsigma.squeeze())
183183
temp = eta + sigma * (np.minimum(depth_c, depth) + eta)
184184
shape = temp.shape
185185
result = np.ones(shape, dtype=temp.dtype) * zlev

0 commit comments

Comments
 (0)