code: def test_grid32_c128():
      # Check that we can use a float32 input and complex128 output
      uv32 = CoordinateSystem("uv", "input", np.float32)
      xyz128 = CoordinateSystem("xyz", "output", np.complex128)
  
      def par_c128(x):
          return parametric_mapping(x).astype(np.complex128)
  
      surface = CoordinateMap(uv32, xyz128, par_c128)
      g = Grid(surface)
      xyz_grid = g[-1:1:201j, -1:1:101j]
      x, y, z = xyz_grid.transposed_values
      assert x.shape == (201, 101)
      assert y.shape == (201, 101)
      assert z.shape == (201, 101)
      assert x.dtype == np.dtype(np.complex128)
  
file_path: nipy/nipy/core/reference/tests/test_parametrized_surface.py
imports: import numpy
  from nipy.core.api import CoordinateMap, CoordinateSystem, Grid
label_desc: Use image node_id 6 for calling a global function with example usage: test_grid32_c128() and returns: parametric_mapping