[Numpy-discussion] binary_repr dtype dependence
Stéfan van der Walt
stefan@sun.ac...
Sun Jul 13 16:35:29 CDT 2008
Hi Ralf
2008/7/13 Ralf Gommers <ralf.gommers@googlemail.com>:
> 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'
That's a bug. It happens because
In [9]: hex(np.uint16(255))
Out[9]: '0x1'
Please create a ticket.
Regards
Stéfan
More information about the Numpy-discussion
mailing list