summaryrefslogtreecommitdiff
path: root/numpy/core/memmap.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2010-04-12 20:35:59 +0000
committerCharles Harris <charlesr.harris@gmail.com>2010-04-12 20:35:59 +0000
commit4d821188c3baeefccaff0d8074ea0ee838327f66 (patch)
treedd69dac3189200e532fbef8809cf25c3b4ad7fc3 /numpy/core/memmap.py
parent375542b2dd182dce0af0c32579645e7b30659bb0 (diff)
downloadnumpy-4d821188c3baeefccaff0d8074ea0ee838327f66.tar.gz
ENH: Add filename attribute to memmap.
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r--numpy/core/memmap.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/numpy/core/memmap.py b/numpy/core/memmap.py
index ed888a040..b4a25cf9c 100644
--- a/numpy/core/memmap.py
+++ b/numpy/core/memmap.py
@@ -227,11 +227,13 @@ class memmap(ndarray):
self = ndarray.__new__(subtype, shape, dtype=descr, buffer=mm,
offset=offset, order=order)
self._mmap = mm
+ self.filename = filename
return self
def __array_finalize__(self, obj):
if hasattr(obj, '_mmap'):
self._mmap = obj._mmap
+ self.filename = obj.filename
else:
self._mmap = None