original_docstring: 
      Apply an arbritrary geometric transform.
  
      The given mapping function is used to find, for each point in the
      output, the corresponding coordinates in the input. The value of the
      input at those coordinates is determined by spline interpolation of
      the requested order.
  
      Parameters
      ----------
      input : array_like
          The input array.
      mapping : callable
          A callable object that accepts a tuple of length equal to the output
          array rank, and returns the corresponding input coordinates as a tuple
          of length equal to the input array rank.
      output_shape : tuple of ints, optional
          Shape tuple.
      output : ndarray or dtype, optional
          The array in which to place the output, or the dtype of the returned
          array.
      order : int, optional
          The order of the spline interpolation, default is 3.
          The order has to be in the range 0-5.
      mode : str, optional
          Points outside the boundaries of the input are filled according
          to the given mode ('constant', 'nearest', 'reflect' or 'wrap').
          Default is 'constant'.
      cval : scalar, optional
          Value used for points outside the boundaries of the input if
          ``mode='constant'``. Default is 0.0
      prefilter : bool, optional
          The parameter prefilter determines if the input is pre-filtered with
          `spline_filter` before interpolation (necessary for spline
          interpolation of order > 1).  If False, it is assumed that the input is
          already filtered. Default is True.
      extra_arguments : tuple, optional
          Extra arguments passed to `mapping`.
      extra_keywords : dict, optional
          Extra keywords passed to `mapping`.
  
      Returns
      -------
      return_value : ndarray or None
          The filtered input. If `output` is given as a parameter, None is
          returned.
  
      See Also
      --------
      map_coordinates, affine_transform, spline_filter1d
  
      Examples
      --------
      >>> from scipy import ndimage
      >>> a = np.arange(12.).reshape((4, 3))
      >>> def shift_func(output_coords):
      ...     return (output_coords[0] - 0.5, output_coords[1] - 0.5)
      ...
      >>> ndimage.geometric_transform(a, shift_func)
      array([[ 0.   ,  0.   ,  0.   ],
             [ 0.   ,  1.362,  2.738],
             [ 0.   ,  4.812,  6.187],
             [ 0.   ,  8.263,  9.637]])
  
      
docstring: Apply an arbritrary geometric transform.
  The given mapping function is used to find, for each point in the
  output, the corresponding coordinates in the input. The value of the
  input at those coordinates is determined by spline interpolation of
  the requested order.
  
  Parameters
  
  input : array_like
  The input array.
  mapping : callable
  A callable object that accepts a tuple of length equal to the output
  array rank, and returns the corresponding input coordinates as a tuple
  of length equal to the input array rank.
  output_shape : tuple of ints, optional
  Shape tuple.
  output : ndarray or dtype, optional
  The array in which to place the output, or the dtype of the returned
  array.
  order : int, optional
  The order of the spline interpolation, default is 3.
  The order has to be in the range 0-5.
  
  Returns
  
  return_value : ndarray or None
  The filtered input. If `output` is given as a parameter, None is
  returned.
  
  See Also
  
  
  
  Examples
  
  
docstring_tokens: Apply an arbritrary geometric transform . The given mapping function is used to find for each point in the output the corresponding coordinates in the input . The value of the input at those coordinates is determined by spline interpolation of the requested order . Parameters input : array_like The input array . mapping : callable A callable object that accepts a tuple of length equal to the output array rank and returns the corresponding input coordinates as a tuple of length equal to the input array rank . output_shape : tuple of ints optional Shape tuple . output : ndarray or dtype optional The array in which to place the output or the dtype of the returned array . order : int optional The order of the spline interpolation default is 3 . The order has to be in the range 0 - 5 . Returns return_value : ndarray or None The filtered input . If ` output ` is given as a parameter None is returned . See Also Examples
code: def geometric_transform(input, mapping, output_shape=None,
                          output=None, order=3,
                          mode='constant', cval=0.0, prefilter=True,
                          extra_arguments=(), extra_keywords={}):
      """
      Apply an arbritrary geometric transform.
  
      The given mapping function is used to find, for each point in the
      output, the corresponding coordinates in the input. The value of the
      input at those coordinates is determined by spline interpolation of
      the requested order.
  
      Parameters
      ----------
      input : array_like
          The input array.
      mapping : callable
          A callable object that accepts a tuple of length equal to the output
          array rank, and returns the corresponding input coordinates as a tuple
          of length equal to the input array rank.
      output_shape : tuple of ints, optional
          Shape tuple.
      output : ndarray or dtype, optional
          The array in which to place the output, or the dtype of the returned
          array.
      order : int, optional
          The order of the spline interpolation, default is 3.
          The order has to be in the range 0-5.
      mode : str, optional
          Points outside the boundaries of the input are filled according
          to the given mode ('constant', 'nearest', 'reflect' or 'wrap').
          Default is 'constant'.
      cval : scalar, optional
          Value used for points outside the boundaries of the input if
          ``mode='constant'``. Default is 0.0
      prefilter : bool, optional
          The parameter prefilter determines if the input is pre-filtered with
          `spline_filter` before interpolation (necessary for spline
          interpolation of order > 1).  If False, it is assumed that the input is
          already filtered. Default is True.
      extra_arguments : tuple, optional
          Extra arguments passed to `mapping`.
      extra_keywords : dict, optional
          Extra keywords passed to `mapping`.
  
      Returns
      -------
      return_value : ndarray or None
          The filtered input. If `output` is given as a parameter, None is
          returned.
  
      See Also
      --------
      map_coordinates, affine_transform, spline_filter1d
  
      Examples
      --------
      >>> from scipy import ndimage
      >>> a = np.arange(12.).reshape((4, 3))
      >>> def shift_func(output_coords):
      ...     return (output_coords[0] - 0.5, output_coords[1] - 0.5)
      ...
      >>> ndimage.geometric_transform(a, shift_func)
      array([[ 0.   ,  0.   ,  0.   ],
             [ 0.   ,  1.362,  2.738],
             [ 0.   ,  4.812,  6.187],
             [ 0.   ,  8.263,  9.637]])
  
      """
      if order < 0 or order > 5:
          raise RuntimeError('spline order not supported')
      input = numpy.asarray(input)
      if numpy.iscomplexobj(input):
          raise TypeError('Complex type not supported')
      if output_shape is None:
          output_shape = input.shape
      if input.ndim < 1 or len(output_shape) < 1:
          raise RuntimeError('input and output rank must be > 0')
      mode = _extend_mode_to_code(mode)
      if prefilter and order > 1:
          filtered = spline_filter(input, order, output=numpy.float64)
      else:
          filtered = input
      output, return_value = _ni_support._get_output(output, input,
                                                     shape=output_shape)
      _geometric_transform(filtered, mapping, None, None, None, output,
                           order, mode, cval, extra_arguments, extra_keywords)
      return return_value
code_tokens: def geometric_transform ( input , mapping , output_shape = None , output = None , order = 3 , mode = 'constant' , cval = 0.0 , prefilter = True , extra_arguments = ( ) , extra_keywords = { } ) : if order < 0 or order > 5 : raise RuntimeError ( 'spline order not supported' ) input = numpy . asarray ( input ) if numpy . iscomplexobj ( input ) : raise TypeError ( 'Complex type not supported' ) if output_shape is None : output_shape = input . shape if input . ndim < 1 or len ( output_shape ) < 1 : raise RuntimeError ( 'input and output rank must be > 0' ) mode = _extend_mode_to_code ( mode ) if prefilter and order > 1 : filtered = spline_filter ( input , order , output = numpy . float64 ) else : filtered = input output , return_value = _ni_support . _get_output ( output , input , shape = output_shape ) _geometric_transform ( filtered , mapping , None , None , None , output , order , mode , cval , extra_arguments , extra_keywords ) return return_value
short_docstring: Apply an arbritrary geometric transform.
short_docstring_tokens: Apply an arbritrary geometric transform .
comment: """
      Apply an arbritrary geometric transform.
  
      The given mapping function is used to find, for each point in the
      output, the corresponding coordinates in the input. The value of the
      input at those coordinates is determined by spline interpolation of
      the requested order.
  
      Parameters
      ----------
      input : array_like
          The input array.
      mapping : callable
          A callable object that accepts a tuple of length equal to the output
          array rank, and returns the corresponding input coordinates as a tuple
          of length equal to the input array rank.
      output_shape : tuple of ints, optional
          Shape tuple.
      output : ndarray or dtype, optional
          The array in which to place the output, or the dtype of the returned
          array.
      order : int, optional
          The order of the spline interpolation, default is 3.
          The order has to be in the range 0-5.
      mode : str, optional
          Points outside the boundaries of the input are filled according
          to the given mode ('constant', 'nearest', 'reflect' or 'wrap').
          Default is 'constant'.
      cval : scalar, optional
          Value used for points outside the boundaries of the input if
          ``mode='constant'``. Default is 0.0
      prefilter : bool, optional
          The parameter prefilter determines if the input is pre-filtered with
          `spline_filter` before interpolation (necessary for spline
          interpolation of order > 1).  If False, it is assumed that the input is
          already filtered. Default is True.
      extra_arguments : tuple, optional
          Extra arguments passed to `mapping`.
      extra_keywords : dict, optional
          Extra keywords passed to `mapping`.
  
      Returns
      -------
      return_value : ndarray or None
          The filtered input. If `output` is given as a parameter, None is
          returned.
  
      See Also
      --------
      map_coordinates, affine_transform, spline_filter1d
  
      Examples
      --------
      >>> from scipy import ndimage
      >>> a = np.arange(12.).reshape((4, 3))
      >>> def shift_func(output_coords):
      ...     return (output_coords[0] - 0.5, output_coords[1] - 0.5)
      ...
      >>> ndimage.geometric_transform(a, shift_func)
      array([[ 0.   ,  0.   ,  0.   ],
             [ 0.   ,  1.362,  2.738],
             [ 0.   ,  4.812,  6.187],
             [ 0.   ,  8.263,  9.637]])
  
      """