docstr: ivy.Array instance method variant of ivy.diff. This method simply
  wraps the function, and so the docstring for ivy.diff also applies to
  this method with minimal changes.
  
  Parameters
  ----------
  self
      array-like input.
  n
      The number of times values are differenced. If zero, the input is returned
      as-is.
  axis
      The axis along which the difference is taken, default is the last axis.
  prepend,append
      Values to prepend/append to x along given axis prior to performing the
      difference. Scalar values are expanded to arrays with length 1 in the
      direction of axis and the shape of the input array in along all other
      axes. Otherwise the dimension and shape must match x except along axis.
  out
      optional output array, for writing the result to.
  
  Returns
  -------
  ret
      Returns the n-th discrete difference along the given axis.
  
  Examples
  --------
  >>> x = ivy.array([1, 2, 4, 7, 0])
  >>> x.diff()
  ivy.array([ 1,  2,  3, -7])
docstr_tok: ["ivy.Array","instance","method","variant","of","ivy.diff",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.diff","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","array-like","input",".","n","The","number","of","times","values","are","differenced",".","If","zero",",","the","input","is","returned","as-is",".","axis","The","axis","along","which","the","difference","is","taken",",","default","is","the","last","axis",".","prepend",",","append","Values","to","prepend\/append","to","x","along","given","axis","prior","to","performing","the","difference",".","Scalar","values","are","expanded","to","arrays","with","length","1","in","the","direction","of","axis","and","the","shape","of","the","input","array","in","along","all","other","axes",".","Otherwise","the","dimension","and","shape","must","match","x","except","along","axis",".","out","optional","output","array",",","for","writing","the","result","to",".","Returns","--","--","--","-","ret","Returns","the","n-th","discrete","difference","along","the","given","axis",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","1",",","2",",","4",",","7",",","0","]",")",">",">",">","x.diff","(",")","ivy.array","(","[","1",",","2",",","3",",","-7","]",")"]
code: def diff(
      self: ivy.Array,
      /,
      *,
      n: int = 1,
      axis: int = -1,
      prepend: Optional[
          Union[ivy.Array, ivy.NativeArray, int, list, tuple]
      ] = None,
      append: Optional[
          Union[ivy.Array, ivy.NativeArray, int, list, tuple]
      ] = None,
      out: Optional[ivy.Array] = None,
  ) -> ivy.Array:
      """ivy.Array instance method variant of ivy.diff. This method simply
      wraps the function, and so the docstring for ivy.diff also applies to
      this method with minimal changes.
  
      Parameters
      ----------
      self
          array-like input.
      n
          The number of times values are differenced. If zero, the input is returned
          as-is.
      axis
          The axis along which the difference is taken, default is the last axis.
      prepend,append
          Values to prepend/append to x along given axis prior to performing the
          difference. Scalar values are expanded to arrays with length 1 in the
          direction of axis and the shape of the input array in along all other
          axes. Otherwise the dimension and shape must match x except along axis.
      out
          optional output array, for writing the result to.
  
      Returns
      -------
      ret
          Returns the n-th discrete difference along the given axis.
  
      Examples
      --------
      >>> x = ivy.array([1, 2, 4, 7, 0])
      >>> x.diff()
      ivy.array([ 1,  2,  3, -7])
      """
      return ivy.diff(
          self._data,
          n=n,
          axis=axis,
          prepend=prepend,
          append=append,
          out=out,
      )
  
imports: import abc
  from typing import Optional, Union, Tuple, List, Sequence
  from numbers import Number
  import ivy
label_desc: Use image node_id 15 for calling the _ArrayWithElementWiseExperimental obj's underlying member method code with example usage: obj.diff() and returns: ivy