Re: [Numpy-discussion] np.array, copy=False and memmap

2017-09-06 Thread Thomas Jollans
On 2017-08-07 23:01, Nisoli Isaia wrote: > Dear all, > I have a question about the behaviour of  > | > | > |y ||=||np.array(x, copy||=||False||, dtype||=||'float32'||)| > > when x is a memmap. If we check the memmap attribute of mmap> | > | > |print||"mmap attribute"||, y._mmap| > | > | > numpy te

Re: [Numpy-discussion] np.array, copy=False and memmap

2017-08-10 Thread Allan Haldane
On 08/07/2017 05:01 PM, Nisoli Isaia wrote: > Dear all, > I have a question about the behaviour of > > y = np.array(x, copy=False, dtype='float32') > > when x is a memmap. If we check the memmap attribute of mmap > > print "mmap attribute", y._mmap > > numpy tells us that y is not a memmap. > B

Re: [Numpy-discussion] np.array, copy=False and memmap

2017-08-10 Thread Allan Haldane
On 08/10/2017 02:24 PM, Sebastian Berg wrote: > On Thu, 2017-08-10 at 12:27 -0400, Allan Haldane wrote: >> On 08/07/2017 05:01 PM, Nisoli Isaia wrote: >>> Dear all, >>> I have a question about the behaviour of >>> >>> y = np.array(x, copy=False, dtype='float32') >>> >>> when x is a memmap. If we ch

Re: [Numpy-discussion] np.array, copy=False and memmap

2017-08-10 Thread Sebastian Berg
On Thu, 2017-08-10 at 12:27 -0400, Allan Haldane wrote: > On 08/07/2017 05:01 PM, Nisoli Isaia wrote: > > Dear all, > > I have a question about the behaviour of > > > > y = np.array(x, copy=False, dtype='float32') > > > > when x is a memmap. If we check the memmap attribute of mmap > > > > print

Re: [Numpy-discussion] np.array, copy=False and memmap

2017-08-10 Thread Allan Haldane
On 08/07/2017 05:01 PM, Nisoli Isaia wrote: > Dear all, > I have a question about the behaviour of > > y = np.array(x, copy=False, dtype='float32') > > when x is a memmap. If we check the memmap attribute of mmap > > print "mmap attribute", y._mmap > > numpy tells us that y is not a memmap. > B

[Numpy-discussion] np.array, copy=False and memmap

2017-08-07 Thread Nisoli Isaia
Dear all, I have a question about the behaviour of y = np.array(x, copy=False, dtype='float32') when x is a memmap. If we check the memmap attribute of mmap print "mmap attribute", y._mmap numpy tells us that y is not a memmap. But the following code snippet crashes the python interpreter # op