class_docstr: Check the byteorder of unicode arrays in round-trip conversions
class_docstr_tok: ["Check","the","byteorder","of","unicode","arrays","in","round-trip","conversions"]
code: def test_values_cast(self):
      # Check byteorder of when casting the array for a strided and
      # contiguous array:
      test1 = np.array(
          [self.ucs_value * self.ulen] * 2, dtype="U%s" % self.ulen
      )
      test2 = np.repeat(test1, 2)[::2]
      for ua in (test1, test2):
          ua2 = ua.astype(dtype=ua.dtype.newbyteorder())
          assert_((ua == ua2).all())
          assert_(ua[-1] == ua2[-1])
          ua3 = ua2.astype(dtype=ua.dtype)
          # Arrays must be equal after the round-trip
          assert_equal(ua, ua3)
  
imports: import pytest
  import numpy
  from numpy.testing import assert_, assert_equal, assert_array_equal
label_desc: Use image node_id 4 for calling the ByteorderValues obj's underlying member method code with example usage: obj.test_values_cast() without return types