summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Sales de Andrade <quantum.analyst@gmail.com>2018-11-19 23:49:14 -0500
committerElliott Sales de Andrade <quantum.analyst@gmail.com>2018-11-19 23:49:14 -0500
commitc4bce96a2588f889b9659d4dd88538466d937fe5 (patch)
treed6809f2cecfc28647b6b27844d71f808eb0a8f35
parentf332aae17941186aa3254231cbef8b09eda4a0a9 (diff)
downloadnumpy-c4bce96a2588f889b9659d4dd88538466d937fe5.tar.gz
MNT: Reword error message about loading pickled data.
This double negative is confusing to me.
-rw-r--r--numpy/lib/npyio.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index 1da5b0a25..f623c58e7 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -441,8 +441,8 @@ def load(file, mmap_mode=None, allow_pickle=True, fix_imports=True,
else:
# Try a pickle
if not allow_pickle:
- raise ValueError("allow_pickle=False, but file does not contain "
- "non-pickled data")
+ raise ValueError("Cannot load file containing pickled data "
+ "when allow_pickle=False")
try:
return pickle.load(fid, **pickle_kwargs)
except Exception: