[Numpy-discussion] .transpose() of memmap array fails to close()

Alan G Isaac aisaac at american.edu
Mon Aug 13 11:51:49 EDT 2007

On Fri, 10 Aug 2007, "Glen W. Mabey" apparently wrote:
> It seems that any slice of a numpy.memmap that is greater than 1-d has 
> a similar problem.  
> In [1]:import numpy 
> In [2]:amemmap = numpy.memmap( '/tmp/afile', dtype=numpy.float32,  shape=(4,5), mode='w+' )
> In [3]:amemmap[1,3:4] 
> Out[3]:memmap([ 0.], dtype=float32) 
> In [4]:amemmap[0:1,3:4] 
> Exception exceptions.AttributeError: "'memmap' object has no attribute '_mmap'" in <bound method memmap.__del__ of memmap([ 0.], dtype=float32)> ignored 
> Out[4]:memmap([[ 0.]], dtype=float32)

You have not heard from anyone on this yet, right?
Please continue to post your findings.

Alan Isaac

More information about the NumPy-Discussion mailing list