diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-02-03 20:01:07 +0100 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2014-02-11 19:30:21 +0100 |
commit | 2facd5cbdcaa08b61270c0c0760a39cd03acc007 (patch) | |
tree | 7001911b928ecc830184633e209bd052073d6895 /doc/source/reference | |
parent | b7850701a31127cad8c7399cea6be9cd5f71bec5 (diff) | |
download | numpy-2facd5cbdcaa08b61270c0c0760a39cd03acc007.tar.gz |
ENH: add tobytes and stop using tostring in documentation
tostring returns bytes which are not equal to string, so provide a
tobytes function alias.
tostring does not emit a deprecation warning yet so rdepends do not need
to check two names to support older versions of numpy without warnings.
Diffstat (limited to 'doc/source/reference')
-rw-r--r-- | doc/source/reference/arrays.ndarray.rst | 1 | ||||
-rw-r--r-- | doc/source/reference/c-api.array.rst | 2 | ||||
-rw-r--r-- | doc/source/reference/maskedarray.baseclass.rst | 1 | ||||
-rw-r--r-- | doc/source/reference/routines.ma.rst | 2 |
4 files changed, 4 insertions, 2 deletions
diff --git a/doc/source/reference/arrays.ndarray.rst b/doc/source/reference/arrays.ndarray.rst index 85e41c215..e9c0a6d87 100644 --- a/doc/source/reference/arrays.ndarray.rst +++ b/doc/source/reference/arrays.ndarray.rst @@ -294,6 +294,7 @@ Array conversion ndarray.itemset ndarray.setasflat ndarray.tostring + ndarray.tobytes ndarray.tofile ndarray.dump ndarray.dumps diff --git a/doc/source/reference/c-api.array.rst b/doc/source/reference/c-api.array.rst index 6e68a9a0e..323ca0655 100644 --- a/doc/source/reference/c-api.array.rst +++ b/doc/source/reference/c-api.array.rst @@ -1574,7 +1574,7 @@ Conversion .. cfunction:: PyObject* PyArray_ToString(PyArrayObject* self, NPY_ORDER order) - Equivalent to :meth:`ndarray.tostring` (*self*, *order*). Return the bytes + Equivalent to :meth:`ndarray.tobytes` (*self*, *order*). Return the bytes of this array in a Python string. .. cfunction:: PyObject* PyArray_ToFile(PyArrayObject* self, FILE* fp, char* sep, char* format) diff --git a/doc/source/reference/maskedarray.baseclass.rst b/doc/source/reference/maskedarray.baseclass.rst index fd1fd7ae6..a1c90a45d 100644 --- a/doc/source/reference/maskedarray.baseclass.rst +++ b/doc/source/reference/maskedarray.baseclass.rst @@ -200,6 +200,7 @@ Conversion MaskedArray.tolist MaskedArray.torecords MaskedArray.tostring + MaskedArray.tobytes Shape manipulation diff --git a/doc/source/reference/routines.ma.rst b/doc/source/reference/routines.ma.rst index 6eda37578..5cb38e83f 100644 --- a/doc/source/reference/routines.ma.rst +++ b/doc/source/reference/routines.ma.rst @@ -251,7 +251,7 @@ Conversion operations ma.MaskedArray.tofile ma.MaskedArray.tolist ma.MaskedArray.torecords - ma.MaskedArray.tostring + ma.MaskedArray.tobytes Pickling and unpickling |