Skip to content

Commit 6996397

Browse files
committed
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).
1 parent 02d1204 commit 6996397

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

numpy/ma/tests/test_extras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1674,7 +1674,7 @@ def test_shape_scalar(self):
16741674
class TestNDEnumerate:
16751675

16761676
def test_ndenumerate_nomasked(self):
1677-
ordinary = np.ndarray(6).reshape((1, 3, 2))
1677+
ordinary = np.arange(6.).reshape((1, 3, 2))
16781678
empty_mask = np.zeros_like(ordinary, dtype=bool)
16791679
with_mask = masked_array(ordinary, mask=empty_mask)
16801680
assert_equal(list(np.ndenumerate(ordinary)),

0 commit comments

Comments
 (0)