diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2010-04-12 20:35:59 +0000 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2010-04-12 20:35:59 +0000 |
commit | 4d821188c3baeefccaff0d8074ea0ee838327f66 (patch) | |
tree | dd69dac3189200e532fbef8809cf25c3b4ad7fc3 /numpy/core/memmap.py | |
parent | 375542b2dd182dce0af0c32579645e7b30659bb0 (diff) | |
download | numpy-4d821188c3baeefccaff0d8074ea0ee838327f66.tar.gz |
ENH: Add filename attribute to memmap.
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r-- | numpy/core/memmap.py | 2 |
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 |