示例#1
0
 def test(self):
     x = np.arange(5, dtype='>i8')
     expected = np.arange(5, dtype='int64')
     a = conventions.NativeEndiannessArray(x)
     assert a.dtype == expected.dtype
     assert a.dtype == expected[:].dtype
     self.assertArrayEqual(a, expected)
示例#2
0
 def test(self) -> None:
     x = np.arange(5, dtype=">i8")
     expected = np.arange(5, dtype="int64")
     a = conventions.NativeEndiannessArray(x)
     assert a.dtype == expected.dtype
     assert a.dtype == expected[:].dtype
     assert_array_equal(a, expected)