[Numpy-discussion] convert integer into bit array
Nikolas Tautenhahn
virtual at gmx.de
Mon May 16 17:04:17 EDT 2011
Hi,
> Here
>
> http://code.google.com/p/pylibtiff/source/browse/#svn%2Ftrunk%2Flibtiff%2Fbitarray-0.3.5-numpy
>
> you can find bitarray with numpy support.
>
Thanks, that looks promising - to get a numpy array, I need to do
numpy.array(bitarray.bitarray(numpy.binary_repr(i, l)))
for an integer i and l with i < 2**l, right?
best regards,
Nik
More information about the NumPy-Discussion
mailing list