diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-05-12 14:48:15 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2022-05-12 14:48:15 +0200 |
commit | 6996397b00e4d2dd609deca430d05f6e80e8cea2 (patch) | |
tree | 58040f36ce49266889a1580694dc1b89eb308603 /numpy/ma/tests/test_extras.py | |
parent | 02d1204b0840d19b20c83a9d658ffc37f2eb39ac (diff) | |
download | numpy-6996397b00e4d2dd609deca430d05f6e80e8cea2.tar.gz |
TST: Fix uninitialized value in masked ndenumerate test
The test used unintialized values, if NaN happened to be there
the test would fail (and generally, uninitialized values being used
in tests is bad, since it shows up in valgrind).
Diffstat (limited to 'numpy/ma/tests/test_extras.py')
-rw-r--r-- | numpy/ma/tests/test_extras.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/ma/tests/test_extras.py b/numpy/ma/tests/test_extras.py index 05403344b..1827edd1f 100644 --- a/numpy/ma/tests/test_extras.py +++ b/numpy/ma/tests/test_extras.py @@ -1674,7 +1674,7 @@ class TestShapeBase: class TestNDEnumerate: def test_ndenumerate_nomasked(self): - ordinary = np.ndarray(6).reshape((1, 3, 2)) + ordinary = np.arange(6.).reshape((1, 3, 2)) empty_mask = np.zeros_like(ordinary, dtype=bool) with_mask = masked_array(ordinary, mask=empty_mask) assert_equal(list(np.ndenumerate(ordinary)), |