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

Method __init__

numpy/_core/tests/test_finfo.py:10–21  ·  view source on GitHub ↗
(self, dtype, machep, negep, minexp, maxexp, nmant, iexp)

Source from the content-addressed store, hash-verified

8class MachArLike:
9 """Minimal class to simulate machine arithmetic parameters."""
10 def __init__(self, dtype, machep, negep, minexp, maxexp, nmant, iexp):
11 self.dtype = dtype
12 self.machep = machep
13 self.negep = negep
14 self.minexp = minexp
15 self.maxexp = maxexp
16 self.nmant = nmant
17 self.iexp = iexp
18 self.eps = exp2(dtype(-nmant))
19 self.epsneg = exp2(dtype(negep))
20 self.precision = int(-log10(self.eps))
21 self.resolution = dtype(10) ** (-self.precision)
22
23
24@pytest.fixture

Callers

nothing calls this directly

Calls 2

log10Function · 0.90
dtypeFunction · 0.85

Tested by

no test coverage detected