10000 Merge pull request #5217 from jnothman/note-issue-1866 · pitrou/numpy@e73ee5d · GitHub
[go: up one dir, main page]

Skip to content

Commit e73ee5d

Browse files
committed
Merge pull request numpy#5217 from jnothman/note-issue-1866
DOC note the effect of numpy#1866 in byteorder discussion
2 parents 31b94e8 + f107a98 commit e73ee5d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

numpy/doc/byteswapping.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,15 @@
6161
big-endian (data endianness) and we've set the dtype to match (the dtype
6262
is also big-endian). However, sometimes you need to flip these around.
6363
64+
.. warning::
65+
66+
Scalars currently do not include byte order information, so extracting
67+
a scalar from an array will return an integer in native byte order.
68+
Hence:
69+
70+
>>> big_end_arr[0].dtype.byteorder == little_end_u4[0].dtype.byteorder
71+
True
72+
6473
Changing byte ordering
6574
======================
6675

0 commit comments

Comments
 (0)
0