Skip to content

Commit f37a4f3

Browse files
authored
Merge pull request numpy#27444 from zvijayakumar/main
TST: Added the test case for masked array tofile failing
2 parents b9ba526 + 0995ce9 commit f37a4f3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

numpy/ma/tests/test_core.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1015,6 +1015,13 @@ def test_object_with_array(self):
10151015
mx[1].data[0] = 0.
10161016
assert_(mx2[0] == 0.)
10171017

1018+
def test_maskedarray_tofile_raises_notimplementederror(self):
1019+
xm = masked_array([1, 2, 3], mask=[False, True, False])
1020+
# Test case to check the NotImplementedError.
1021+
# It is not implemented at this point of time. We can change this in future
1022+
with pytest.raises(NotImplementedError):
1023+
np.save('xm.np', xm)
1024+
10181025

10191026
class TestMaskedArrayArithmetic:
10201027
# Base test class for MaskedArrays.

0 commit comments

Comments
 (0)