[Numpy-svn] r3862 - trunk/numpy/core

numpy-svn@scip... numpy-svn@scip...
Fri Jun 8 00:50:29 CDT 2007


Author: oliphant
Date: 2007-06-08 00:50:09 -0500 (Fri, 08 Jun 2007)
New Revision: 3862

Modified:
   trunk/numpy/core/memmap.py
Log:
Fix so that _mmap gets carried through .transpose

Modified: trunk/numpy/core/memmap.py
===================================================================
--- trunk/numpy/core/memmap.py	2007-06-07 05:51:11 UTC (rev 3861)
+++ trunk/numpy/core/memmap.py	2007-06-08 05:50:09 UTC (rev 3862)
@@ -77,9 +77,13 @@
         return self
 
     def __array_finalize__(self, obj):
-        if obj is not None and not isinstance(obj, memmap):
-            raise ValueError, "Cannot create a memmap array that way"
-        self._mmap = None
+        if obj is not None:
+            if not isinstance(obj, memmap):
+                raise ValueError, "Cannot create a memmap array that way"
+            self._mmap = obj._mmap
+        else:
+            self._mmap = None
+        return
 
     def sync(self):
         self._mmap.flush()



More information about the Numpy-svn mailing list