ID EN
Array

byteswap

Python 3.11

“Byteswap” all items of the array. This is only supported for values which are 1, 2, 4, or 8 bytes in size; for other types of values, RuntimeError is raised. It is useful when reading data from a file written on a machine with a different byte order.

Syntax

PYTHON
byteswap()

See Also

RuntimeError