code: def test_as_ndarray_more():
      # list
      # same dtype, no copy requested
      arr1 = [0, 1, 2, 3]
      arr2 = as_ndarray(arr1)
      assert not are_arrays_identical(arr1, arr2)
  
      # same dtype, copy requested
      arr1 = [0, 1, 2, 3]
      arr2 = as_ndarray(arr1, copy=True)
      assert not are_arrays_identical(arr1, arr2)
  
      # different dtype
      arr1 = [0, 1, 2, 3]
      arr2 = as_ndarray(arr1, dtype=float)
      assert arr2.dtype == float
      assert not are_arrays_identical(arr1, arr2)
  
      # order specified
      arr1 = [[0, 1, 2, 3], [0, 1, 2, 3]]
      arr2 = as_ndarray(arr1, dtype=float, order="F")
      assert arr2.dtype == float
      assert (
          arr2.flags["F_CONTIGUOUS"] and not arr2.flags["C_CONTIGUOUS"]
      )
      assert not are_arrays_identical(arr1[0], arr2[0])
  
      # Unhandled cases
      with pytest.raises(ValueError):
          as_ndarray("test_string")
      with pytest.raises(ValueError):
          as_ndarray([], order="invalid")
  
file_path: nilearn/nilearn/_utils/tests/test_numpy_conversions.py
imports: import os
  import tempfile
  import numpy
  import pytest
  from nilearn._utils.numpy_conversions import as_ndarray, csv_to_array
label_desc: Use image node_id 5 for calling a global function with example usage: test_as_ndarray_more() without return types