MCPcopy Create free account
hub / github.com/numpy/numpy / test_masked_nan_inf

Method test_masked_nan_inf

numpy/testing/tests/test_utils.py:161–170  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

159 self._test_not_equal(c, b)
160
161 def test_masked_nan_inf(self):
162 # Regression test for gh-11121
163 a = np.ma.MaskedArray([3., 4., 6.5], mask=[False, True, False])
164 b = np.array([3., np.nan, 6.5])
165 self._test_equal(a, b)
166 self._test_equal(b, a)
167 a = np.ma.MaskedArray([3., 4., 6.5], mask=[True, False, False])
168 b = np.array([np.inf, 4., 6.5])
169 self._test_equal(a, b)
170 self._test_equal(b, a)
171
172 def test_subclass_that_overrides_eq(self):
173 # While we cannot guarantee testing functions will always work for

Callers

nothing calls this directly

Calls 1

_test_equalMethod · 0.80

Tested by

no test coverage detected