MCPcopy
hub / github.com/numpy/numpy / test_minmax_ints

Method test_minmax_ints

numpy/ma/tests/test_core.py:1474–1482  ·  view source on GitHub ↗
(self, dtype, mask, axis)

Source from the content-addressed store, hash-verified

1472 ])
1473 @pytest.mark.parametrize("axis", [None, -1])
1474 def test_minmax_ints(self, dtype, mask, axis):
1475 iinfo = np.iinfo(dtype)
1476 # two dimensional to hit certain filling paths
1477 a = np.array([[0, 10, -10, iinfo.min, iinfo.max]] * 2).astype(dtype)
1478 mask = np.asarray([mask] * 2)
1479
1480 masked_a = masked_array(a, mask=mask)
1481 assert_array_equal(masked_a.min(axis), a[~mask].min(axis))
1482 assert_array_equal(masked_a.max(axis), a[~mask].max(axis))
1483
1484 @pytest.mark.parametrize("time_type", ["M8[s]", "m8[s]"])
1485 def test_minmax_time_dtypes(self, time_type):

Callers

nothing calls this directly

Calls 4

assert_array_equalFunction · 0.90
astypeMethod · 0.80
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected