code: def are_arrays_identical(arr1, arr2):
      """Check if two 1-dimensional array point to the same buffer.
  
      The check is performed only on the first value of the arrays. For
      this test to be reliable, arr2 must not point to a subset of arr1.
      For example, if arr2 = arr1[1:] has been executed just before calling
      this function, the test will FAIL, even if the same buffer is used by
      both arrays. arr2 = arr1[:1] will succeed though.
  
      dtypes are not supposed to be identical.
      """
      # Modify the first value in arr1 twice, and see if corresponding
      # value in arr2 has changed. Changing the value twice is required, since
      # the original value could be the first value that we use.
  
      orig1 = arr1[0]
      orig2 = arr2[0]
  
      arr1[0] = 0
      if arr2[0] != orig2:
          arr1[0] = orig1
          return True
  
      arr1[0] = 1
      if arr2[0] != orig2:
          arr1[0] = orig1
          return True
  
      arr1[0] = orig1
      return False
  
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 1 for calling a global function with example usage: are_arrays_identical(arr1, arr2) and returns: False, True, True