[Numpy-discussion] memmap & dtype issue

Wim Bakker bakker@itc...
Mon Dec 1 05:31:59 CST 2008

For a long time now, numpy's memmap has me puzzled by its behavior. When I use
memmap straightforward on a file it seems to work fine, but whenever I try to 
do a memmap using a dtype it seems to gobble up the whole file into memory. 
This, of course, makes the use of memmap futile. I would expect that the 
result of such an operation would give me a true memmap and that the data 
would be converted to dtype on the fly.

I've seen this behavior in version version 1.04, 1.1.1 and still in 1.2.1. 
I'm working on Windows haven't tried it on Linux. 

Am I doing something wrong? Are my expectations wrong? Or is this an issue
somewhere deeper in numpy? I looked at the memmap.py and it seems to me that
most of the work is delegated to numpy.ndarray.__new__. Something wrong there

Can somebody help please?



Wim Bakker

More information about the Numpy-discussion mailing list