Skip to content

Commit 79d636e

Browse files
authored
Fix test_incompatible_dimensions test (#3977)
* test_incompatible_dimensions used a ragged array for the test, which has been deprecated in numpy, and now fails if dtype is anything other than object. This test appears to be checking that the addition of a [2x4] masked array to a [2x3] masked cube should raise a ValueError. This commit fixes the creation of `data3` object to be a [2x4] non-ragged array. * Added entry to what's new * Added name to core developer list :) * Update latest.rst Fixed space in PR macro call
1 parent 636b97b commit 79d636e

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

docs/iris/src/common_links.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
.. _@djkirkham: https://github.com/djkirkham
4343
.. _@DPeterK: https://github.com/DPeterK
4444
.. _@esc24: https://github.com/esc24
45+
.. _@jamesp: https://github.com/jamesp
4546
.. _@jonseddon: https://github.com/jonseddon
4647
.. _@jvegasbsc: https://github.com/jvegasbsc
4748
.. _@lbdreyer: https://github.com/lbdreyer

docs/iris/src/whatsnew/latest.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ This document explains the changes made to Iris for this release
8282

8383
#. `@rcomer`_ removed an old unused test file. (:pull:`3913`)
8484

85+
#. `@jamesp`_ updated a test to the latest numpy version (:pull:`3977`)
8586

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

lib/iris/tests/test_basic_maths.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,7 @@ def setUp(self):
853853

854854
def test_incompatible_dimensions(self):
855855
data3 = ma.MaskedArray(
856-
[[3, 3, 3, 4], [2, 2, 2]], mask=[[0, 1, 0, 0], [0, 1, 1]]
856+
[[3, 3, 3, 4], [2, 2, 2, 2]], mask=[[0, 1, 0, 0], [0, 1, 1, 1]]
857857
)
858858
with self.assertRaises(ValueError):
859859
# Incompatible dimensions.

0 commit comments

Comments
 (0)