[Numpy-discussion] Views of memmaps and offset
Charles R Harris
charlesr.harris@gmail....
Sat Sep 22 12:52:49 CDT 2012
On Sat, Sep 22, 2012 at 11:31 AM, Gael Varoquaux <
gael.varoquaux@normalesup.org> wrote:
> On Sat, Sep 22, 2012 at 11:16:27AM -0600, Charles R Harris wrote:
> > I think this is a bug, taking a view should probably update the
> offset.
>
> OK, we can include a fix for that alongside with the patch to keep track
> of the filename.
>
It already tracks the file name
In [1]: a = np.memmap('tmp.mmap', dtype=np.float64, shape=50, mode='w+',
offset=4)
In [2]: b = a[10:]
In [3]: b.filename
Out[3]: '/home/charris/tmp.mmap'
or did you mean something else? I was guessing the fix could be mad in the
same place that copied over the filename.
>
> Cheers,
>
> Gaël
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120922/3625a658/attachment.html
More information about the NumPy-Discussion
mailing list