diff options
author | Antony Lee <anntzer.lee@gmail.com> | 2021-07-24 16:27:35 +0200 |
---|---|---|
committer | Antony Lee <anntzer.lee@gmail.com> | 2021-07-24 16:29:59 +0200 |
commit | 8235ebda451904a86c1b0adec497a298b9f480a9 (patch) | |
tree | 28987bb6859d6494e74d1b53dfaafd3ef4ded7e5 /numpy/lib/npyio.py | |
parent | c3d1107b8931313c85947439c406dab98ebfc8ea (diff) | |
download | numpy-8235ebda451904a86c1b0adec497a298b9f480a9.tar.gz |
DOC: clarify doc re: unsupported keys in savez.
The previous wording ("When saving dictionaries") could be interpreted
as refering to calls like `savez("foo.npz", {"a": 1, "b": 2})`
(literally "saving a dict to foo.npz"); reword to avoid this possibility
of confusion.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index c4d625bd3..d12482cb7 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -581,9 +581,9 @@ def savez(file, *args, **kwds): its list of arrays (with the ``.files`` attribute), and for the arrays themselves. - When saving dictionaries, the dictionary keys become filenames - inside the ZIP archive. Therefore, keys should be valid filenames. - E.g., avoid keys that begin with ``/`` or contain ``.``. + Keys passed in `kwds` are used as filenames inside the ZIP archive. + Therefore, keys should be valid filenames; e.g., avoid keys that begin with + ``/`` or contain ``.``. When naming variables with keyword arguments, it is not possible to name a variable ``file``, as this would cause the ``file`` argument to be defined |