[Numpy-discussion] Functions to pack/unpack bytes?
Wed Jul 29 20:51:38 CDT 2009
Doesn't .view work for that?
Sent from my iPhone
On Jul 29, 2009, at 6:57 AM, Neal Becker <email@example.com> wrote:
> Neal Becker wrote:
>> Does numpy have functions to convert between e.g. an array of
>> uint32 and
>> uint8, where the uint32 array is a packed version of the uint8 array
>> (selecting little/big endian)?
> I've been thinking about making a ufunc (in python) to do this, but
> have no
> idea how to make a ufunc for a function that consumes 4 consecutive
> of it's input and produces an output array of 1/4 the size of the
> input. Is
> that possible?
> NumPy-Discussion mailing list
More information about the NumPy-Discussion