summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--numpy/core/memmap.py10
-rw-r--r--numpy/core/tests/test_memmap.py8
2 files changed, 2 insertions, 16 deletions
diff --git a/numpy/core/memmap.py b/numpy/core/memmap.py
index 71f5de93c..844e13c4e 100644
--- a/numpy/core/memmap.py
+++ b/numpy/core/memmap.py
@@ -278,11 +278,6 @@ class memmap(ndarray):
if self._mmap is not None:
self._mmap.flush()
- def sync(self):
- """This method is deprecated, use `flush`."""
- warnings.warn("Use ``flush``.", DeprecationWarning)
- self.flush()
-
def _close(self):
"""Close the memmap file. Only do this when deleting the object."""
if self.base is self._mmap:
@@ -292,11 +287,6 @@ class memmap(ndarray):
self._mmap.close()
self._mmap = None
- def close(self):
- """Close the memmap file. Does nothing."""
- warnings.warn("``close`` is deprecated on memmap arrays. Use del",
- DeprecationWarning)
-
def __del__(self):
# We first check if we are the owner of the mmap, rather than
# a view, so deleting a view does not call _close
diff --git a/numpy/core/tests/test_memmap.py b/numpy/core/tests/test_memmap.py
index 9e3cf2039..18b356ce2 100644
--- a/numpy/core/tests/test_memmap.py
+++ b/numpy/core/tests/test_memmap.py
@@ -4,7 +4,7 @@ import warnings
from numpy import memmap
from numpy import arange, allclose
-from numpy.testing import *
+from numpy.testing import TestCase, assert_, assert_array_equal
class TestMemmap(TestCase):
def setUp(self):
@@ -27,7 +27,7 @@ class TestMemmap(TestCase):
# Read data back from file
newfp = memmap(self.tmpfp, dtype=self.dtype, mode='r',
shape=self.shape)
- assert allclose(self.data, newfp)
+ assert_(allclose(self.data, newfp))
assert_array_equal(self.data, newfp)
def test_open_with_filename(self):
@@ -71,10 +71,6 @@ class TestMemmap(TestCase):
fp[:] = self.data[:]
fp.flush()
- warnings.simplefilter('ignore', DeprecationWarning)
- fp.sync()
- warnings.simplefilter('default', DeprecationWarning)
-
def test_del(self):
# Make sure a view does not delete the underlying mmap
fp_base = memmap(self.tmpfp, dtype=self.dtype, mode='w+',