Re: [Numpy-discussion] Memory mapping and NPZ files

2015-12-12 Thread Nathaniel Smith
On Dec 12, 2015 10:53 AM, "Mathieu Dubois" wrote: > > Le 11/12/2015 11:22, Sturla Molden a écrit : >> >> Mathieu Dubois wrote: >> >>> The point is precisely that, you can't do memory mapping with Npz files >>> (while it works with Npy files). >> >> The operating system can memory map any file. Bu

Re: [Numpy-discussion] Memory mapping and NPZ files

2015-12-12 Thread Mathieu Dubois
Le 11/12/2015 11:22, Sturla Molden a écrit : Mathieu Dubois wrote: The point is precisely that, you can't do memory mapping with Npz files (while it works with Npy files). The operating system can memory map any file. But as npz-files are compressed, you will need to uncompress the contents i

Re: [Numpy-discussion] Memory mapping and NPZ files

2015-12-11 Thread Erik Bray
On Wed, Dec 9, 2015 at 9:51 AM, Mathieu Dubois wrote: > Dear all, > > If I am correct, using mmap_mode with Npz files has no effect i.e.: > f = np.load("data.npz", mmap_mode="r") > X = f['X'] > will load all the data in memory. > > Can somebody confirm that? > > If I'm correct, the mmap_mode argum

Re: [Numpy-discussion] Memory mapping and NPZ files

2015-12-11 Thread Sturla Molden
Mathieu Dubois wrote: > The point is precisely that, you can't do memory mapping with Npz files > (while it works with Npy files). The operating system can memory map any file. But as npz-files are compressed, you will need to uncompress the contents in your memory mapping to make sense of it.

Re: [Numpy-discussion] Memory mapping and NPZ files

2015-12-10 Thread Mathieu Dubois
On 10/12/2015 13:55, Sturla Molden wrote: Mathieu Dubois wrote: Does it make sense? No. Memory mapping should just memory map, not do all sorts of crap. The point is precisely that, you can't do memory mapping with Npz files (while it works with Npy files). Mathieu __

Re: [Numpy-discussion] Memory mapping and NPZ files

2015-12-10 Thread Mathieu Dubois
On 10/12/2015 15:35, Sebastian Berg wrote: On Mi, 2015-12-09 at 15:51 +0100, Mathieu Dubois wrote: Dear all, If I am correct, using mmap_mode with Npz files has no effect i.e.: f = np.load("data.npz", mmap_mode="r") X = f['X'] will load all the data in memory. My take on it is, that no, I d

Re: [Numpy-discussion] Memory mapping and NPZ files

2015-12-10 Thread Sebastian Berg
On Mi, 2015-12-09 at 15:51 +0100, Mathieu Dubois wrote: > Dear all, > > If I am correct, using mmap_mode with Npz files has no effect i.e.: > f = np.load("data.npz", mmap_mode="r") > X = f['X'] > will load all the data in memory. > My take on it is, that no, I do not want implicit extraction/cop

Re: [Numpy-discussion] Memory mapping and NPZ files

2015-12-10 Thread Sturla Molden
Mathieu Dubois wrote: > Does it make sense? No. Memory mapping should just memory map, not do all sorts of crap. Sturla ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion

[Numpy-discussion] Memory mapping and NPZ files

2015-12-09 Thread Mathieu Dubois
Dear all, If I am correct, using mmap_mode with Npz files has no effect i.e.: f = np.load("data.npz", mmap_mode="r") X = f['X'] will load all the data in memory. Can somebody confirm that? If I'm correct, the mmap_mode argument could be passed to the NpzFile class which could in turn perform t