Binary input into NumPy.

Emile van Sebille emile at fenx.com
Mon Sep 9 17:26:01 EDT 2002


Maurice van de Rijzen:
> I just downloaded Numerical Python and I think it will be very usefull.
> However I have one major broblem:
> I don't know how to import binary data from a file on disk into an array!
> Can onyone help me with this problem?
>

look into Numeric.fromstring(open('filename', 'br').read(), numpytype)

HTH,

Emile van Sebille
emile at fenx.com









More information about the Python-list mailing list