summaryrefslogtreecommitdiff
path: root/numpy/lib/npyio.py
diff options
context:
space:
mode:
authorDmytro <dmytropolitov@gmail.com>2017-06-26 16:00:22 -0400
committerStefan van der Walt <stefanv@berkeley.edu>2019-10-15 09:45:09 -0700
commit2c0b42b9193ce4e201cc4fa77ff188600b06e15f (patch)
treee4e28a69a62099c5f5bb66df288619e2ab33ef10 /numpy/lib/npyio.py
parent2138cb1fbbc322884108386af05ef25b22ecf23a (diff)
downloadnumpy-2c0b42b9193ce4e201cc4fa77ff188600b06e15f.tar.gz
DOC: added note to docstring of numpy.savez
Note indicates that when used with dictionaries, savez will remove leading "/" in dictionary keys. See #9265
Diffstat (limited to 'numpy/lib/npyio.py')
-rw-r--r--numpy/lib/npyio.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/numpy/lib/npyio.py b/numpy/lib/npyio.py
index e57a6dd47..0d09fe66f 100644
--- a/numpy/lib/npyio.py
+++ b/numpy/lib/npyio.py
@@ -611,6 +611,11 @@ def savez(file, *args, **kwds):
its list of arrays (with the ``.files`` attribute), and for the arrays
themselves.
+ When saving dictionaries, avoid using keys that begin with "/", as the
+ first slash will be removed by the python archive function. If they
+ must be used, prepend another character ahead of the slash to ensure
+ that the "/" will not be removed.
+
Examples
--------
>>> from tempfile import TemporaryFile