[Numpy-discussion] Reading from binary file with memmap, with offset

Andreas Hilboll lists at hilboll.de
Thu Oct 10 09:16:42 EDT 2013


On 10.10.2013 14:57, Julian Taylor wrote:
> you have to use the offset keyword argument of np.memmap, else it will
> always start from the beginning of the file
> 
>>>> np.memmap(fd, dtype="float32", mode="r", offset=offset)

Thanks for that! I just proposed an update to the memmap docstring to
better reflect this:

   https://github.com/numpy/numpy/pull/3890

-- Andreas.



More information about the NumPy-Discussion mailing list