Related to Determine the endianness of a numpy array
Given an array
x = np.arange(3)
I can get the byte order by doing
>>> x.dtype.byteorder
'='
How do I find out if this is big or little endian? I would like to get '<'
, '>'
or '|'
as the output, not '='
.
To be clear, I am not hung up on what format the information comes in. I just want to know "big endian", "little endian" or "irrelevant", but I don't care if it's "native" or not.
sys.byteorder
? – Breezy