From 2c0b42b9193ce4e201cc4fa77ff188600b06e15f Mon Sep 17 00:00:00 2001 From: Dmytro Date: Mon, 26 Jun 2017 16:00:22 -0400 Subject: DOC: added note to docstring of numpy.savez Note indicates that when used with dictionaries, savez will remove leading "/" in dictionary keys. See #9265 --- numpy/lib/npyio.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'numpy/lib') 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 -- cgit v1.2.1