original_docstring: 
      Shift an array.
  
      The array is shifted using spline interpolation of the requested order.
      Points outside the boundaries of the input are filled according to the
      given mode.
  
      Parameters
      ----------
      input : ndarray
          The input array.
      shift : float or sequence, optional
          The shift along the axes. If a float, `shift` is the same for each
          axis. If a sequence, `shift` should contain one value for each axis.
      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.
  
      Returns
      -------
      shift : ndarray or None
          The shifted input. If `output` is given as a parameter, None is
          returned.
  
      
docstring: Shift an array.
  The array is shifted using spline interpolation of the requested order.
  Points outside the boundaries of the input are filled according to the
  given mode.
  
  Parameters
  
  input : ndarray
  The input array.
  shift : float or sequence, optional
  The shift along the axes. If a float, `shift` is the same for each
  axis. If a sequence, `shift` should contain one value for each axis.
  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
  
  shift : ndarray or None
  The shifted input. If `output` is given as a parameter, None is
  returned.
docstring_tokens: Shift an array . The array is shifted using spline interpolation of the requested order . Points outside the boundaries of the input are filled according to the given mode . Parameters input : ndarray The input array . shift : float or sequence optional The shift along the axes . If a float ` shift ` is the same for each axis . If a sequence ` shift ` should contain one value for each axis . 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 shift : ndarray or None The shifted input . If ` output ` is given as a parameter None is returned .
code: def shift(input, shift, output=None, order=3, mode='constant', cval=0.0,
            prefilter=True):
      """
      Shift an array.
  
      The array is shifted using spline interpolation of the requested order.
      Points outside the boundaries of the input are filled according to the
      given mode.
  
      Parameters
      ----------
      input : ndarray
          The input array.
      shift : float or sequence, optional
          The shift along the axes. If a float, `shift` is the same for each
          axis. If a sequence, `shift` should contain one value for each axis.
      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.
  
      Returns
      -------
      shift : ndarray or None
          The shifted input. If `output` is given as a parameter, None is
          returned.
  
      """
      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 input.ndim < 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)
      shift = _ni_support._normalize_sequence(shift, input.ndim)
      shift = [-ii for ii in shift]
      shift = numpy.asarray(shift, dtype=numpy.float64)
      if not shift.flags.contiguous:
          shift = shift.copy()
      _nd_image.zoom_shift(filtered, None, shift, output, order, mode, cval)
      return return_value
code_tokens: def shift ( input , shift , output = None , order = 3 , mode = 'constant' , cval = 0.0 , prefilter = True ) : 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 input . ndim < 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 ) shift = _ni_support . _normalize_sequence ( shift , input . ndim ) shift = [ - ii for ii in shift ] shift = numpy . asarray ( shift , dtype = numpy . float64 ) if not shift . flags . contiguous : shift = shift . copy ( ) _nd_image . zoom_shift ( filtered , None , shift , output , order , mode , cval ) return return_value
short_docstring: Shift an array.
short_docstring_tokens: Shift an array .
comment: """
      Shift an array.
  
      The array is shifted using spline interpolation of the requested order.
      Points outside the boundaries of the input are filled according to the
      given mode.
  
      Parameters
      ----------
      input : ndarray
          The input array.
      shift : float or sequence, optional
          The shift along the axes. If a float, `shift` is the same for each
          axis. If a sequence, `shift` should contain one value for each axis.
      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.
  
      Returns
      -------
      shift : ndarray or None
          The shifted input. If `output` is given as a parameter, None is
          returned.
  
      """