code: def test_array_copy():
      """Test copying during construction."""
      info = create_info(1, 1000.0)
      data = np.zeros((1, 1000))
      # 'auto' (default)
      raw = RawArray(data, info)
      assert raw._data is data
      assert raw.info is not info
      raw = RawArray(data.astype(np.float32), info)
      assert raw._data is not data
      assert raw.info is not info
      # 'info' (more restrictive)
      raw = RawArray(data, info, copy="info")
      assert raw._data is data
      assert raw.info is not info
      with pytest.raises(
          ValueError, match="data copying was not .* copy='info"
      ):
          RawArray(data.astype(np.float32), info, copy="info")
      # 'data'
      raw = RawArray(data, info, copy="data")
      assert raw._data is not data
      assert raw.info is info
      # 'both'
      raw = RawArray(data, info, copy="both")
      assert raw._data is not data
      assert raw.info is not info
      raw = RawArray(data.astype(np.float32), info, copy="both")
      assert raw._data is not data
      assert raw.info is not info
      # None
      raw = RawArray(data, info, copy=None)
      assert raw._data is data
      assert raw.info is info
      with pytest.raises(
          ValueError, match="data copying was not .* copy=None"
      ):
          RawArray(data.astype(np.float32), info, copy=None)
  
file_path: mne-python/mne/io/array/tests/test_array.py
imports: from pathlib import Path
  import matplotlib.pyplot
  import numpy
  import pytest
  from numpy.testing import assert_allclose, assert_array_almost_equal, assert_equal
  from mne import Epochs, find_events, pick_types
  from mne._fiff.meas_info import create_info
  from mne._fiff.pick import get_channel_type_constants
  from mne.channels import make_dig_montage
  from mne.io import read_raw_fif
  from mne.io.array import RawArray
  from mne.io.tests.test_raw import _test_raw_reader
label_desc: Use image node_id 2 for calling a global function with example usage: test_array_copy() without return types