summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2017-12-11 10:12:11 -0700
committerGitHub <noreply@github.com>2017-12-11 10:12:11 -0700
commit8a847c8b075f8ba39bdf81ff216b022d99f6fc6b (patch)
tree736cc66448b1e39efc158dc1e98f433f9a708536 /numpy/lib/npyio.py
parent06b972f05072a9390808bf2c895427ce8a46bb42 (diff)
parent7df73defce92506b4b67b37ed1c9164347f0f986 (diff)
downloadnumpy-8a847c8b075f8ba39bdf81ff216b022d99f6fc6b.tar.gz
Merge pull request #10192 from eric-wieser/deprecate-pickle-aliases
DEP: Deprecate the pickle aliases
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py9
1 files changed, 8 insertions, 1 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index e4d827334..7b51cb9c7 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -30,7 +30,14 @@ else:
import cPickle as pickle
from future_builtins import map
-loads = pickle.loads
+
+def loads(*args, **kwargs):
+ # NumPy 1.15.0, 2017-12-10
+ warnings.warn(
+ "np.loads is deprecated, use pickle.loads instead",
+ DeprecationWarning, stacklevel=2)
+ return pickle.loads(*args, **kwargs)
+
__all__ = [
'savetxt', 'loadtxt', 'genfromtxt', 'ndfromtxt', 'mafromtxt',