Skip to content

Commit

Permalink
Fix test_incompatible_dimensions test (SciTools#3977)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
jamesp authored and bjlittle committed Mar 1, 2021
1 parent 65abdd9 commit 57d484e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/iris/tests/test_basic_maths.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,7 +853,7 @@ def setUp(self):

def test_incompatible_dimensions(self):
data3 = ma.MaskedArray(
[[3, 3, 3, 4], [2, 2, 2]], mask=[[0, 1, 0, 0], [0, 1, 1]]
[[3, 3, 3, 4], [2, 2, 2, 2]], mask=[[0, 1, 0, 0], [0, 1, 1, 1]]
)
with self.assertRaises(ValueError):
# Incompatible dimensions.
Expand Down

0 comments on commit 57d484e

Please sign in to comment.