code: def test_surrogate_array():
      """Check that with no noise, the surrogate activation correspond to
      the ones that we specify. 2D version
      """
      # We can't use random positions, as the positions have to be
      # far-enough not to overlap.
      pos = np.array([[2, 10], [10, 4], [19, 15], [15, 19], [5, 18]])
      ampli = np.random.random(5)
      data = surrogate_2d_dataset(
          n_subj=1,
          noise_level=0,
          spatial_jitter=0,
          signal_jitter=0,
          pos=pos,
          shape=(20, 20),
          ampli=ampli,
      ).squeeze()
      x, y = pos.T
      np.testing.assert_array_equal(data[x, y], ampli)
  
file_path: nipy/nipy/labs/utils/tests/test_simul_multisubject_fmri_dataset.py
imports: import numpy
  from nibabel import Nifti1Image
  from ..simul_multisubject_fmri_dataset import surrogate_2d_dataset, surrogate_3d_dataset, surrogate_4d_dataset
label_desc: Use image node_id 1 for calling a global function with example usage: test_surrogate_array() without return types