Offset is not updated when slicing memmaps #471

Open
GaelVaroquaux opened this Issue Sep 30, 2012 · 1 comment

Projects

None yet

2 participants

@GaelVaroquaux
Contributor
>>> import numpy as np
>>> a = np.ones((10, 10))
>>> np.save('a.npy', a)
>>> b = np.load('a.npy', mmap_mode='r')
>>> c = b[3:]
>>> c.offset
80
>>> b.offset
80

The offset of c is wrong: it does not take in account the fact that the slicing has changed the offset.

@charris
Member
charris commented Feb 16, 2014

Still true in 1.9-devel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment