[Numpy-discussion] bitwise view on numpy array

Stéfan van der Walt stefan at sun.ac.za
Wed May 6 07:45:09 EDT 2009


Hi Vincent

Take a look at http://pypi.python.org/pypi/bitarray/

I'm not sure if you can initialise bitarrays from NumPy arrays.  If
not, you'll have to implement a conversion scheme, but that can be
done without making a copy.

Regards
Stéfan

2009/5/6 Vincent Schut <schut at sarvision.nl>:
> Hi,
>
> I'm gonna have large (e.g. 2400x2400) arrays of 16 and 32 bit bitfields.
>  I've been searching in vain for an efficient and convenient way to
> represent these array's individual bit's (or, even better, configureable
> bitfields of 1-4 bits each).



More information about the NumPy-Discussion mailing list