diff options
author | melissawm <melissawm@gmail.com> | 2021-05-24 21:12:43 -0300 |
---|---|---|
committer | melissawm <melissawm@gmail.com> | 2021-05-24 21:12:43 -0300 |
commit | 09dcb3bbe932c49e50a4eee392972e5ddd54985a (patch) | |
tree | a80c3a70a2a8a895c0916a471d193fe00016847f /numpy/lib/npyio.py | |
parent | fe3d717080e812383900507168a6bd7093c4e434 (diff) | |
download | numpy-09dcb3bbe932c49e50a4eee392972e5ddd54985a.tar.gz |
DOC: Add note to savez about naming variables with keyword `file`.
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r-- | numpy/lib/npyio.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py index 9552579cf..5780a05bb 100644 --- a/numpy/lib/npyio.py +++ b/numpy/lib/npyio.py @@ -586,6 +586,10 @@ def savez(file, *args, **kwds): 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 + twice in the call to ``savez``. + Examples -------- >>> from tempfile import TemporaryFile |