MCPcopy Index your code
hub / github.com/numpy/numpy / assert_finfo_equal

Function assert_finfo_equal

numpy/_core/tests/test_getlimits.py:46–53  ·  view source on GitHub ↗
(f1, f2)

Source from the content-addressed store, hash-verified

44 assert_equal(id(ftype), id(ftype2))
45
46def assert_finfo_equal(f1, f2):
47 # assert two finfo instances have the same attributes
48 for attr in ('bits', 'eps', 'epsneg', 'iexp', 'machep',
49 'max', 'maxexp', 'min', 'minexp', 'negep', 'nexp',
50 'nmant', 'precision', 'resolution', 'tiny',
51 'smallest_normal', 'smallest_subnormal'):
52 assert_equal(getattr(f1, attr), getattr(f2, attr),
53 f'finfo instances {f1} and {f2} differ on {attr}')
54
55def assert_iinfo_equal(i1, i2):
56 # assert two iinfo instances have the same attributes

Callers 2

test_basicMethod · 0.85
test_instancesFunction · 0.85

Calls 1

assert_equalFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…