|,> and <in numpy datatype

This may be a very stupid question, but I tried using google keywords such as I less and greater signs in data type of numpydidn’t find the link.

In the doc numpy ,

x = np.array([(1.0, 2), (3.0, 4)], dtype=[('x', float), ('y', int)])

exits

array([(1.0, 2), (3.0, 4)],
      dtype=[('x', '<f8'), ('y', '<i4')])

But on my pc output

array([(1.0, 2), (3.0, 4)],
      dtype=[('x', '>f8'), ('y', '>i4')])

What do they mean <and >in meaning dtypeand why is there a difference?

+4
source share
1 answer

< > , endianness. , ( 1 , int16, int32, float32...). numpy, :

  • |: , ( )

  • <: little-endian

  • >: big-endian

@tobias_k @RobertKern, , , .

+7

All Articles