[Numpy-discussion] Bits info in np.finfo

Charles R Harris charlesr.harris@gmail....
Fri Nov 6 13:23:26 CST 2009


On Fri, Nov 6, 2009 at 12:11 PM, Thomas Robitaille <
thomas.robitaille@gmail.com> wrote:

> Hi,
>
> Is there a reason that np.finfo does not have a bits attribute?
>
> In [6]: np.iinfo(np.int16).bits
> Out[6]: 16
>
> In [7]: np.finfo(np.float32).bits
> ---------------------------------------------------------------------------
> AttributeError                            Traceback (most recent call
> last)
>
> /Users/tom/<ipython console> in <module>()
>
> AttributeError: 'finfo' object has no attribute 'bits'
>
> Should I submit a bug report?
>
>
Maybe a request for enhancement. There are actually two possible
interpretations here: actual bits and storage bits. Extended doubles are 80
bits, but stored as 96 or 128 bits for alignment purposes.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091106/cf67ecf5/attachment.html 


More information about the NumPy-Discussion mailing list