diff options
| author | Sebastian Berg <sebastian@sipsolutions.net> | 2020-06-11 12:31:44 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-11 12:31:44 -0500 |
| commit | 0c384dad6a0a7bfc9842e92253c5f02b810b8bbd (patch) | |
| tree | 81e7d08f6f7978e1a5fba786d216da64eae79203 /numpy | |
| parent | 02d66ecd80a1851c3b206f4d778687b38c9d2c36 (diff) | |
| parent | 5300d20fec0d3b06c1e7e5623db06c2e6f8eaee9 (diff) | |
| download | numpy-0c384dad6a0a7bfc9842e92253c5f02b810b8bbd.tar.gz | |
Merge pull request #16291 from abhilash42/tobytes-doc-change
DOC: Improve "tobytes" docstring.
Diffstat (limited to 'numpy')
| -rw-r--r-- | numpy/core/_add_newdocs.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py index 688238af3..31585779b 100644 --- a/numpy/core/_add_newdocs.py +++ b/numpy/core/_add_newdocs.py @@ -1525,7 +1525,7 @@ add_newdoc('numpy.core.multiarray', 'c_einsum', Controls the memory layout of the output. 'C' means it should be C contiguous. 'F' means it should be Fortran contiguous, 'A' means it should be 'F' if the inputs are all 'F', 'C' otherwise. - 'K' means it should be as close to the layout as the inputs as + 'K' means it should be as close to the layout of the inputs as is possible, including arbitrarily permuted axes. Default is 'K'. casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional @@ -3936,18 +3936,17 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('tobytes', """ Construct Python bytes containing the raw data bytes in the array. Constructs Python bytes showing a copy of the raw contents of - data memory. The bytes object can be produced in either 'C' or 'Fortran', - or 'Any' order (the default is 'C'-order). 'Any' order means C-order - unless the F_CONTIGUOUS flag in the array is set, in which case it - means 'Fortran' order. + data memory. The bytes object is produced in C-order by default. + This behavior is controlled by the ``order`` parameter. .. versionadded:: 1.9.0 Parameters ---------- - order : {'C', 'F', None}, optional - Order of the data for multidimensional arrays: - C, Fortran, or the same as for the original array. + order : {'C', 'F', 'A'}, optional + Controls the memory layout of the bytes object. 'C' means C-order, + 'F' means F-order, 'A' (short for *Any*) means 'F' if `a` is + Fortran contiguous, 'C' otherwise. Default is 'C'. Returns ------- |
