فهرست منبع

numpy.memmap() no longer has _close; use __del__ instead

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@64426 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 10 سال پیش
والد
کامیت
12f7aa6784
1فایلهای تغییر یافته به همراه3 افزوده شده و 6 حذف شده
  1. 3 6
      lib/python/script/array.py

+ 3 - 6
lib/python/script/array.py

@@ -150,8 +150,7 @@ class array(numpy.memmap):
         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 @@ class array3d(numpy.memmap):
 
         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):