parameters: (a, n=1, axis=-1, prepend=None, append=None)
return_statement: return _npi.diff(a, n=n, axis=axis)
docstring: r"""
      Calculate the n-th discrete difference along the given axis.
  
      Parameters
      ----------
      a : _Symbol
          Input array
      n : int, optional
          The number of times values are differenced. If zero, the input is returned as-is.
      axis : int, optional
          The axis along which the difference is taken, default is the last axis.
      prepend, append : _Symbol, optional
          Not supported yet
  
      Returns
      -------
      diff : _Symbol
          The n-th differences.
          The shape of the output is the same as a except along axis where the dimension is smaller by n.
          The type of the output is the same as the type of the difference between any two elements of a.
          This is the same as the type of a in most cases.
  
      Examples
      --------
      >>> x = np.array([1, 2, 4, 7, 0])
      >>> np.diff(x)
      array([ 1,  2,  3, -7])
      >>> np.diff(x, n=2)
      array([  1,   1, -10])
  
      >>> x = np.array([[1, 3, 6, 10], [0, 5, 6, 8]])
      >>> np.diff(x)
      array([[2, 3, 4],
          [5, 1, 2]])
      >>> np.diff(x, axis=0)
      array([[-1,  2,  0, -2]])
  
      Notes
      -----
      Optional inputs `prepend` and `append` are not supported yet
docstring_summary: r"""
      Calculate the n-th discrete difference along the given axis.
docstring_tokens: r Calculate the n - th discrete difference along the given axis .
function: def diff(a, n=1, axis=-1, prepend=None, append=None):  # pylint: disable=redefined-outer-name
      r"""
      Calculate the n-th discrete difference along the given axis.
  
      Parameters
      ----------
      a : _Symbol
          Input array
      n : int, optional
          The number of times values are differenced. If zero, the input is returned as-is.
      axis : int, optional
          The axis along which the difference is taken, default is the last axis.
      prepend, append : _Symbol, optional
          Not supported yet
  
      Returns
      -------
      diff : _Symbol
          The n-th differences.
          The shape of the output is the same as a except along axis where the dimension is smaller by n.
          The type of the output is the same as the type of the difference between any two elements of a.
          This is the same as the type of a in most cases.
  
      Examples
      --------
      >>> x = np.array([1, 2, 4, 7, 0])
      >>> np.diff(x)
      array([ 1,  2,  3, -7])
      >>> np.diff(x, n=2)
      array([  1,   1, -10])
  
      >>> x = np.array([[1, 3, 6, 10], [0, 5, 6, 8]])
      >>> np.diff(x)
      array([[2, 3, 4],
          [5, 1, 2]])
      >>> np.diff(x, axis=0)
      array([[-1,  2,  0, -2]])
  
      Notes
      -----
      Optional inputs `prepend` and `append` are not supported yet
      """
      if (prepend or append):
          raise NotImplementedError('prepend and append options are not supported yet')
      return _npi.diff(a, n=n, axis=axis)
function_tokens: def diff ( a , n = 1 , axis = - 1 , prepend = None , append = None ) : # pylint: disable=redefined-outer-name if ( prepend or append ) : raise NotImplementedError ( 'prepend and append options are not supported yet' ) return _npi . diff ( a , n = n , axis = axis )