summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authormelissawm <melissawm@gmail.com>2021-05-24 21:12:43 -0300
committermelissawm <melissawm@gmail.com>2021-05-24 21:12:43 -0300
commit09dcb3bbe932c49e50a4eee392972e5ddd54985a (patch)
treea80c3a70a2a8a895c0916a471d193fe00016847f /numpy/lib/npyio.py
parentfe3d717080e812383900507168a6bd7093c4e434 (diff)
downloadnumpy-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.py4
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