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

Method test_reduce_reorder

numpy/core/tests/test_umath.py:2828–2835  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2826 assert_equal(d.min(), d[0])
2827
2828 def test_reduce_reorder(self):
2829 # gh 10370, 11029 Some compilers reorder the call to npy_getfloatstatus
2830 # and put it before the call to an intrisic function that causes
2831 # invalid status to be set. Also make sure warnings are not emitted
2832 for n in (2, 4, 8, 16, 32):
2833 for dt in (np.float32, np.float16, np.complex64):
2834 for r in np.diagflat(np.array([np.nan] * n, dtype=dt)):
2835 assert_equal(np.min(r), np.nan)
2836
2837 def test_minimize_no_warns(self):
2838 a = np.minimum(np.nan, 1)

Callers

nothing calls this directly

Calls 2

assert_equalFunction · 0.90
minMethod · 0.45

Tested by

no test coverage detected