Pierre GM wrote:
> With numpy.core.records, you create a record array. Just get the field ('f0' 
> by default) to get a ndarray.

there is. Don't use numpy.core.records. Use numpy.fromfile:

import numpy

a = numpy.fromfile(filename, dtype=numpy.int16)

(filename can be a filename, or an open file object)

You may want to get fancier with the dtype to force the correct byte order.

-Chris





-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

[EMAIL PROTECTED]
_______________________________________________
Numpy-discussion mailing list
[email protected]
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to