[SciPy-user] partially reading a file...
fred
fredmfp at gmail.com
Wed Aug 6 14:18:19 EDT 2008
Travis E. Oliphant a écrit :
> More directly:
>
> Use numpy.memmap --- look at the docstring for example use and help on
> all the arguments available. But, something like this (untested):
>
> a = numpy.memmap(<filename>, mode='r', dtype=float, shape=(nx,ny,nz))
> b = a[:nx/4,:ny/4,:nz/4]
> b.tofile(<somefilename>)
>
> Should work...
Travis: tons of thanks ! :-))
Cheers,
--
Fred
More information about the SciPy-User
mailing list