Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what does "|" in a numpy type string mean?

Tags:

python

numpy

Many of the examples of dtype strings in the numpy documentation feature a leading | character, for example '|S10' near the top of the structured arrays page in the numpy manual, but neither the structured arrays page nor the data type objects reference seem to explain what this | means. What does | mean in this context and where is this documented?

like image 964
jochen Avatar asked Jun 13 '14 09:06

jochen


1 Answers

It refers to the byteorder / endianness of the dtype. In particular, the '|' indicates byte order is not applicable, such as with 8 bit numbers.

like image 124
Dologan Avatar answered Sep 28 '22 03:09

Dologan