summaryrefslogtreecommitdiff
path: root/numpy/doc/byteswapping.py
diff options
context:
space:
mode:
authorJoel Nothman <joel.nothman@gmail.com>2014-10-22 11:33:33 +1100
committerJoel Nothman <joel.nothman@gmail.com>2014-10-22 11:33:33 +1100
commitf107a98616ba9402ef8956636ef1f9e2cf1a7f80 (patch)
tree067b7dbaf1058ed363d07df57dbb146cc283f0c6 /numpy/doc/byteswapping.py
parent06256714cb6209db5a3fac3681ebfad1ffe715de (diff)
downloadnumpy-f107a98616ba9402ef8956636ef1f9e2cf1a7f80.tar.gz
DOC note the effect of #1866 in byteorder discussion
Diffstat (limited to 'numpy/doc/byteswapping.py')
-rw-r--r--numpy/doc/byteswapping.py9
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
======================