[Numpy-discussion] binary_repr dtype dependence

Ralf Gommers ralf.gommers@googlemail....
Sun Jul 13 14:58:32 CDT 2008

Hi all,

binary_repr() behaves differently for different types of ints/uints:

In [210]: binary_repr(255)
Out[210]: '11111111'

In [211]: binary_repr(uint32(255))
Out[211]: '11111111'

In [212]: binary_repr(uint16(255))
Out[212]: '1'

In [213]: np.__version__
Out[213]: '1.0.4'

Is this intended/acceptable behavior? It is due to the use of hex() (checked
that it is still present in trunk), which expects int or long int.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080713/9077b0d6/attachment.html 

More information about the Numpy-discussion mailing list