Numeric arrays - initialising with binary data

Hugo Martires hmartires at cultalg.pt
Mon Feb 25 07:59:18 EST 2002


Where are this method's ??
I import the array module, but i don't have them.
I'm using python 1.5

Tanks

"Jesper Olsen" <jolsen at mailme.dk> wrote in message
news:cf0ad9fb.0202250446.3df07a08 at posting.google.com...
> Hi,
>
> The build in array type has the methods
>
> array.tostring()
> array.fromstring()
>
> which make it easy to initialise arrays with binary data
> read from a file.
>
> The Numeric array, however, apperantly only has the tostring method.
>
> How can I initialise a Numeric array (eg Float32), with binary data?
>
> I can off course do this by using the Numeric C-API, but I am sure
> there must be an easier way.
>
> I am surprised the Numeric array type does not have the same methods
> as the build in type, if the intention is in time to replace this
> module...
>
> Cheers
> Jesper





More information about the Python-list mailing list