diff options
Diffstat (limited to 'numpy/doc/byteswapping.py')
-rw-r--r-- | numpy/doc/byteswapping.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/doc/byteswapping.py b/numpy/doc/byteswapping.py index 430683d30..59c049878 100644 --- a/numpy/doc/byteswapping.py +++ b/numpy/doc/byteswapping.py @@ -61,6 +61,15 @@ Returning to our ``big_end_arr`` - in this case our underlying data is big-endian (data endianness) and we've set the dtype to match (the dtype 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: + + >>> big_end_arr[0].dtype.byteorder == little_end_u4[0].dtype.byteorder + True + Changing byte ordering ====================== |