diff options
author | Matti Picus <matti.picus@gmail.com> | 2021-11-17 19:07:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 19:07:50 +0200 |
commit | d90298e84499eed6cf6d68be19d6c59b43dd8bed (patch) | |
tree | 578a036e4076ce201dc25fb1758e8dcd38413c82 | |
parent | 3376e08662a950d9bf89a462b2e8de5a135665c4 (diff) | |
parent | 76852d9694256625d4b283242c34369139785ea1 (diff) | |
download | numpy-d90298e84499eed6cf6d68be19d6c59b43dd8bed.tar.gz |
Merge pull request #20147 from arushi-08/updated-docstring-for-binary-file-object
DOC: updated docstring for binary file object
-rw-r--r-- | numpy/lib/npyio.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 6c34e95fe..85e26f094 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -285,7 +285,8 @@ def load(file, mmap_mode=None, allow_pickle=False, fix_imports=True, ---------- file : file-like object, string, or pathlib.Path The file to read. File-like objects must support the - ``seek()`` and ``read()`` methods. Pickled files require that the + ``seek()`` and ``read()`` methods and must always + be opened in binary mode. Pickled files require that the file-like object support the ``readline()`` method as well. mmap_mode : {None, 'r+', 'r', 'w+', 'c'}, optional If not None, then memory-map the file, using the given mode (see |