code: def test_as_native():
      arr = np.arange(5)  # native
      assert_equal(arr.dtype.byteorder, "=")
      narr = as_native_array(arr)
      assert_true(arr is narr)
      sdt = arr.view(arr.dtype.newbyteorder("s"))
      barr = arr.astype(sdt.dtype)
      assert_equal(barr.dtype.byteorder, SWAPPED_ORDER)
      narr = as_native_array(barr)
      assert_false(barr is narr)
      assert_array_equal(barr, narr)
      assert_equal(narr.dtype.byteorder, NATIVE_ORDER)
  
file_path: dipy/dipy/utils/tests/test_arrfuncs.py
imports: import sys
  import numpy
  from dipy.utils.arrfuncs import as_native_array, pinv
  from numpy.testing import assert_array_almost_equal, assert_equal, assert_array_equal
  from dipy.testing import assert_true, assert_false
  from dipy.testing.decorators import set_random_number_generator
label_desc: Use image node_id 1 for calling a global function with example usage: test_as_native() without return types