class finfo:
finfo(dtype)
Machine limits for floating point types.
The object which calculated these parameters and holds more detailed information.
eps
.epsneg
.smallest_normal
, kept for backwards compatibility.MachAr : The implementation of the tests that produce this information. iinfo : The equivalent for integer data types. spacing : The distance between a value and the nearest adjacent number nextafter : The next floating point value after x1 towards x2
For developers of NumPy: do not instantiate this at the module level. The initial calculation of these parameters is expensive and negatively impacts import times. These objects are cached, so calling finfo() repeatedly inside your functions is not a problem.
Note that smallest_normal is not actually the smallest positive representable value in a NumPy floating point type. As in the IEEE-754 standard [1], NumPy floating point types make use of subnormal numbers to fill the gap between 0 and smallest_normal. However, subnormal numbers may have significantly reduced precision [2].
[1] | IEEE Standard for Floating-Point Arithmetic, IEEE Std 754-2008, pp.1-70, 2008, http://www.doi.org/10.1109/IEEESTD.2008.4610935 |
[2] | Wikipedia, "Denormal Numbers", https://en.wikipedia.org/wiki/Denormal_number |
Method | __new__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __str__ |
Undocumented |
Method | _init |
Undocumented |
Class Variable | _finfo_cache |
Undocumented |
Instance Variable | _machar |
Undocumented |
Instance Variable | _str_eps |
Undocumented |
Instance Variable | _str_epsneg |
Undocumented |
Instance Variable | _str_max |
Undocumented |
Instance Variable | _str_resolution |
Undocumented |
Instance Variable | _str_smallest_normal |
Undocumented |
Instance Variable | _str_smallest_subnormal |
Undocumented |
Instance Variable | _str_tiny |
Undocumented |
Instance Variable | bits |
Undocumented |
Instance Variable | dtype |
Undocumented |
Instance Variable | eps |
Undocumented |
Instance Variable | max |
Undocumented |
Instance Variable | min |
Undocumented |
Instance Variable | nexp |
Undocumented |
Instance Variable | nmant |
Undocumented |
Property | machar |
The object which calculated these parameters and holds more detailed information. |
Property | smallest_normal |
Return the value for the smallest normal. |
Property | tiny |
Return the value for tiny, alias of smallest_normal. |
The object which calculated these parameters and holds more detailed information.