diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2022-11-04 19:23:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 11:23:51 -0700 |
commit | d2d6c39d73713cb922cec4b0f37db64d985b83a0 (patch) | |
tree | 8cad42f99f2699a0f8aa8de4d8b55610c86ae62e /doc | |
parent | 77728885a04a3178909111e7ce3f96a544b2796c (diff) | |
download | numpy-d2d6c39d73713cb922cec4b0f37db64d985b83a0.tar.gz |
DOC: Remove "current" from byte-order note and expand it slightly (#22521)
We don't preserve non-native byte-order and we have no wish to do so.
(If someone disagrees, they better wite a NEP ;))
Spell it out, and thus:
closes gh-1866
Co-authored-by: Sebastian Berg <sebastianb@nvidia.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/source/user/byteswapping.rst | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/source/user/byteswapping.rst b/doc/source/user/byteswapping.rst index ddc375683..26ffa8943 100644 --- a/doc/source/user/byteswapping.rst +++ b/doc/source/user/byteswapping.rst @@ -61,13 +61,15 @@ is also big-endian). However, sometimes you need to flip these around. .. warning:: - Scalars currently do not include byte order information, so extracting - a scalar from an array will return an integer in native byte order. - Hence: + Scalars do not include byte order information, so extracting a scalar from + an array will return an integer in native byte order. Hence: >>> big_end_arr[0].dtype.byteorder == little_end_u4[0].dtype.byteorder True + NumPy intentionally does not attempt to always preserve byte-order + and for example converts to native byte-order in `numpy.concatenate`. + Changing byte ordering ====================== |