code: def test_eval_slice():
      input = CoordinateSystem("ij", "input")
      output = CoordinateSystem("xy", "output")
  
      def f(ij):
          i = ij[:, 0]
          j = ij[:, 1]
          return np.array([i**2 + j, j**3 + i]).T
  
      cmap = CoordinateMap(input, output, f)
  
      cmap = CoordinateMap(input, output, f)
      grid = Grid(cmap)
      e = grid[0:50, 0:40]
      ee = e[0:20:3]
  
      assert ee.shape == (7, 40)
      assert ee.values.shape == (280, 2)
      assert ee.transposed_values.shape == (2, 7, 40)
  
      ee = e[0:20:2, 3]
      assert ee.values.shape == (10, 2)
      assert ee.transposed_values.shape == (2, 10)
      assert ee.shape == (10,)
  
file_path: nipy/nipy/core/reference/tests/test_array_coords.py
imports: import numpy
  import pytest
  from numpy.testing import assert_array_almost_equal
  import nipy.core.reference.array_coords
  from nipy.core.api import AffineTransform, ArrayCoordMap, CoordinateMap, CoordinateSystem, Grid
label_desc: Use image node_id 3 for calling a global function with example usage: test_eval_slice() and returns: np