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

Method test_ambigous_fill

numpy/ma/tests/test_extras.py:1146–1153  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1144 assert_equal(np.ma.median(a, (0, 2)), b)
1145
1146 def test_ambigous_fill(self):
1147 # 255 is max value, used as filler for sort
1148 a = np.array([[3, 3, 255], [3, 3, 255]], dtype=np.uint8)
1149 a = np.ma.masked_array(a, mask=a == 3)
1150 assert_array_equal(np.ma.median(a, axis=1), 255)
1151 assert_array_equal(np.ma.median(a, axis=1).mask, False)
1152 assert_array_equal(np.ma.median(a, axis=0), a[0])
1153 assert_array_equal(np.ma.median(a), 255)
1154
1155 def test_special(self):
1156 for inf in [np.inf, -np.inf]:

Callers

nothing calls this directly

Calls 1

assert_array_equalFunction · 0.90

Tested by

no test coverage detected