summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Glaser <pierreglaser@msn.com>2018-10-05 13:12:01 +0200
committerPierre Glaser <pierreglaser@msn.com>2018-10-05 13:12:01 +0200
commit592b22802df74ef7a58d2aaf6f44f45be7e2a9f8 (patch)
tree6d8b4992a438c1b90105a1088c7d21f144c4f8f3
parent0fa036abe0afb89d7b15e3b763252bff37659fd0 (diff)
downloadnumpy-592b22802df74ef7a58d2aaf6f44f45be7e2a9f8.tar.gz
updated documentation for array_dump[s]
-rw-r--r--numpy/core/_add_newdocs.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index 1c82cfde4..9b99648c9 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -3761,7 +3761,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('dot',
add_newdoc('numpy.core.multiarray', 'ndarray', ('dump',
- """a.dump(file)
+ """a.dump(file, protocol=2)
Dump a pickle of the array to the specified file.
The array can be read back with pickle.load or numpy.load.
@@ -3770,20 +3770,26 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('dump',
----------
file : str
A string naming the dump file.
+ protocol : int, optional
+ The pickle protocol used to serialize the array.
+ The default is 2 (in order to maintain python 2 support).
+
"""))
add_newdoc('numpy.core.multiarray', 'ndarray', ('dumps',
"""
- a.dumps()
+ a.dumps(protocol=2)
Returns the pickle of the array as a string.
pickle.loads or numpy.loads will convert the string back to an array.
Parameters
----------
- None
+ protocol : int, optional
+ The pickle protocol used to serialize the array.
+ The default is 2 (in order to maintain python 2 support).
"""))