diff options
author | Matti Picus <matti.picus@gmail.com> | 2018-11-19 21:33:54 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-19 21:33:54 -0800 |
commit | 835b9d6bf430d7689c273ff00f123694fafcbe21 (patch) | |
tree | 5e52d16f9c1265b7b23ac6ff09a020dc886b9d82 /numpy | |
parent | 7c432584fbf4a51835b3e9ca7e2374eae71eaf37 (diff) | |
parent | c4bce96a2588f889b9659d4dd88538466d937fe5 (diff) | |
download | numpy-835b9d6bf430d7689c273ff00f123694fafcbe21.tar.gz |
Merge pull request #12422 from QuLogic/pickle-error
MNT: Reword error message about loading pickled data.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/lib/npyio.py | 4 |
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: |