diff options
author | Matti Picus <matti.picus@gmail.com> | 2019-08-20 18:56:22 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-20 18:56:22 +0300 |
commit | de33c1c9ec847dcd908a1683d2cfdb99b64da72d (patch) | |
tree | 2582ecb1e1744aec130e7f33ec6efecd545265b5 /numpy/core | |
parent | e1c42bb77fa727f0b214f3433207e20261acb57f (diff) | |
parent | f9673c329cf1712bb5e28e1d14260da55a1383a9 (diff) | |
download | numpy-de33c1c9ec847dcd908a1683d2cfdb99b64da72d.tar.gz |
Merge pull request #14256 from kritisingh1/dep6
DEP: Deprecate load/dump functions in favour of pickle methods
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/numeric.py | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index bbcd58abb..8ada87b9f 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -48,14 +48,6 @@ array_function_dispatch = functools.partial( overrides.array_function_dispatch, module='numpy') -def loads(*args, **kwargs): - # NumPy 1.15.0, 2017-12-10 - warnings.warn( - "np.core.numeric.loads is deprecated, use pickle.loads instead", - DeprecationWarning, stacklevel=2) - return pickle.loads(*args, **kwargs) - - __all__ = [ 'newaxis', 'ndarray', 'flatiter', 'nditer', 'nested_iters', 'ufunc', 'arange', 'array', 'zeros', 'count_nonzero', 'empty', 'broadcast', 'dtype', @@ -66,7 +58,7 @@ __all__ = [ 'correlate', 'convolve', 'inner', 'dot', 'outer', 'vdot', 'roll', 'rollaxis', 'moveaxis', 'cross', 'tensordot', 'little_endian', 'fromiter', 'array_equal', 'array_equiv', 'indices', 'fromfunction', - 'isclose', 'load', 'loads', 'isscalar', 'binary_repr', 'base_repr', 'ones', + 'isclose', 'isscalar', 'binary_repr', 'base_repr', 'ones', 'identity', 'allclose', 'compare_chararrays', 'putmask', 'flatnonzero', 'Inf', 'inf', 'infty', 'Infinity', 'nan', 'NaN', 'False_', 'True_', 'bitwise_not', 'CLIP', 'RAISE', 'WRAP', 'MAXDIMS', @@ -2028,30 +2020,6 @@ def base_repr(number, base=2, padding=0): return ''.join(reversed(res or '0')) -def load(file): - """ - Wrapper around cPickle.load which accepts either a file-like object or - a filename. - - Note that the NumPy binary format is not based on pickle/cPickle anymore. - For details on the preferred way of loading and saving files, see `load` - and `save`. - - See Also - -------- - load, save - - """ - # NumPy 1.15.0, 2017-12-10 - warnings.warn( - "np.core.numeric.load is deprecated, use pickle.load instead", - DeprecationWarning, stacklevel=2) - if isinstance(file, type("")): - with open(file, "rb") as file_pointer: - return pickle.load(file_pointer) - return pickle.load(file) - - # These are all essentially abbreviations # These might wind up in a special abbreviations module |