[Numpy-discussion] Using numpy.fromfile with structured array skipping some elements.

Sturla Molden sturla@molden...
Thu Jun 16 09:23:40 CDT 2011


Den 16.06.2011 15:02, skrev Michael Klitgaard:
> Now the data is read in and I can access it, but I have the 'junk' in
> the array, which annoys me.
> Is there a way to remove the junk data, or skip it with fromfile ?

Not that I know of, unless you are ok with a loop (either in Python or 
C). If it's that important (e.g. to save physical memory), you could 
also memory map the file and never reference the junk data.

Sturla




More information about the NumPy-Discussion mailing list