diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2019-02-21 12:49:33 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2019-02-21 12:49:33 -0700 |
commit | b6dc039961768bd5f3a3d7f57e8c396f8fa02815 (patch) | |
tree | 2cf18d5b551afd86970ff2d9c55675e071b7786d /numpy/core/numeric.py | |
parent | 3898fe3fc26245e909c1d2d695b4455f07d4b06c (diff) | |
download | numpy-b6dc039961768bd5f3a3d7f57e8c396f8fa02815.tar.gz |
MAINT: Move pickle import to numpy.compat
The pickle module was being imported from numpy.core.numeric. It was
defined there in order to use pickle5 when available in Python3 and
cpickle in Python2. The numpy.compat module seems a better place for
that.
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index c06b0cf98..386049410 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -15,6 +15,7 @@ import numbers import contextlib import numpy as np +from numpy.compat import pickle, basestring from . import multiarray from .multiarray import ( _fastCopyAndTranspose as fastCopyAndTranspose, ALLOW_THREADS, @@ -44,17 +45,8 @@ ufunc = type(sin) newaxis = None if sys.version_info[0] >= 3: - if sys.version_info[1] in (6, 7): - try: - import pickle5 as pickle - except ImportError: - import pickle - else: - import pickle - basestring = str import builtins else: - import cPickle as pickle import __builtin__ as builtins |