np.finfo().maxexp confusing
11 Oct
2011
11 Oct
'11
9:39 p.m.
Hi, I realize it is probably too late to do anything about this, but: In [72]: info = np.finfo(np.float32) In [73]: info.minexp Out[73]: -126 In [74]: info.maxexp Out[74]: 128 minexp is correct, in that 2**(-126) is the minimum value for the exponent part of float32. But maxexp is not correct, because 2**(127) is the maximum value for the float32 exponent part: http://en.wikipedia.org/wiki/Single_precision_floating-point_format There is the same maxexp+1 feature for the other float types. Is this a sufficiently quiet corner of the API that it might be changed in the future with suitable warnings? Best, Matthew
4573
Age (days ago)
4573
Last active (days ago)
1 comments
1 participants
participants (1)
-
Matthew Brett