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

Method test_basic

numpy/core/tests/test_getlimits.py:60–67  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

58
59class TestFinfo:
60 def test_basic(self):
61 dts = list(zip(['f2', 'f4', 'f8', 'c8', 'c16'],
62 [np.float16, np.float32, np.float64, np.complex64,
63 np.complex128]))
64 for dt1, dt2 in dts:
65 assert_finfo_equal(finfo(dt1), finfo(dt2))
66
67 assert_raises(ValueError, finfo, 'i4')
68
69 def test_regression_gh23108(self):
70 # np.float32(1.0) and np.float64(1.0) have the same hash and are

Callers

nothing calls this directly

Calls 3

finfoClass · 0.90
assert_raisesFunction · 0.90
assert_finfo_equalFunction · 0.85

Tested by

no test coverage detected