diff options
author | Pierre Glaser <pierreglaser@msn.com> | 2018-09-19 17:07:25 +0200 |
---|---|---|
committer | Pierre Glaser <pierreglaser@msn.com> | 2018-10-10 14:53:45 +0200 |
commit | 7372f8dcc6af4446e502c0daec3199dace27e863 (patch) | |
tree | cc9f39762defb52b875ca4e969cb9498a25aa4b4 /numpy/lib | |
parent | 86a7acc8582923604fac849bb19f0b08efc0a91a (diff) | |
download | numpy-7372f8dcc6af4446e502c0daec3199dace27e863.tar.gz |
MAINT, TST import pickle from numpy.core.numeric
All imports of pickle from numpy modules are now done this way:
>>> from numpy.core.numeric import pickle
Also, some loops on protocol numbers are added over pickle tests that
were not caught from #12090
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/format.py | 5 | ||||
-rw-r--r-- | numpy/lib/npyio.py | 3 |
2 files changed, 2 insertions, 6 deletions
diff --git a/numpy/lib/format.py b/numpy/lib/format.py index ef5ec57e3..e25868236 100644 --- a/numpy/lib/format.py +++ b/numpy/lib/format.py @@ -162,11 +162,8 @@ import io import warnings from numpy.lib.utils import safe_eval from numpy.compat import asbytes, asstr, isfileobj, long, basestring +from numpy.core.numeric import pickle -if sys.version_info[0] >= 3: - import pickle -else: - import cPickle as pickle MAGIC_PREFIX = b'\x93NUMPY' MAGIC_LEN = len(MAGIC_PREFIX) + 2 diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 7eb203868..62fc9c5b3 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -23,12 +23,11 @@ from numpy.compat import ( asbytes, asstr, asunicode, asbytes_nested, bytes, basestring, unicode, is_pathlib_path ) +from numpy.core.numeric import pickle if sys.version_info[0] >= 3: - import pickle from collections.abc import Mapping else: - import cPickle as pickle from future_builtins import map from collections import Mapping |