[GRASS-SVN] r64614 - grass/branches/releasebranch_7_0/lib/python/script

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 14 00:26:55 PST 2015


Author: neteler
Date: 2015-02-14 00:26:55 -0800 (Sat, 14 Feb 2015)
New Revision: 64614

Modified:
   grass/branches/releasebranch_7_0/lib/python/script/array.py
Log:
numpy.memmap() no longer has _close; use __del__ instead (trunk, r64426)

Modified: grass/branches/releasebranch_7_0/lib/python/script/array.py
===================================================================
--- grass/branches/releasebranch_7_0/lib/python/script/array.py	2015-02-13 18:47:11 UTC (rev 64613)
+++ grass/branches/releasebranch_7_0/lib/python/script/array.py	2015-02-14 08:26:55 UTC (rev 64614)
@@ -150,8 +150,7 @@
         self.filename = filename
         return self
 
-    def _close(self):
-        numpy.memmap._close(self)
+    def __del__(self):
         if isinstance(self, array):
             try_remove(self.filename)
 
@@ -273,10 +272,8 @@
 
         return self
 
-    def _close(self):
-
-        numpy.memmap._close(self)
-        if isinstance(self, array):
+    def __del__(self):
+        if isinstance(self, array3d):
             try_remove(self.filename)
 
     def read(self, mapname, null=None):



More information about the grass-commit mailing list