docstr: Calculate gradient of x with respect to (w.r.t.) spacing.
  
  Parameters
  ----------
      x
          input array representing outcomes of the function
          spacing
          if not given, indices of x will be used
          if scalar indices of x will be scaled with this value
          if array gradient of x w.r.t. spacing
      edge_order
          1 or 2, for 'frist order' and 'second order' estimation
          of boundary values of gradient respectively.
      axis
          dimension(s) to approximate the gradient over.
          By default, partial gradient is computed in every dimension
  
  
  Returns
  -------
  ret
      Array with values computed from gradient function from
      inputs
  
  Examples
  --------
  >>> coordinates = ivy.Container(
  >>>     a=(ivy.array([-2., -1., 1., 4.]),),
  >>>     b=(ivy.array([2., 1., -1., -4.]),)
  >>> )
  >>> values = ivy.Container(
  >>>     a=ivy.array([4., 1., 1., 16.]),
  >>>     b=ivy.array([4., 1., 1., 16.])
  >>> )
  >>> ivy.gradient(values, spacing=coordinates)
  {
      a: ivy.array([-3., -2., 2., 5.]),
      b: ivy.array([3., 2., -2., -5.])
  }
  
  >>> values = ivy.Container(
  >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
  >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
  >>> )
  >>> ivy.gradient(values)
  [{
      a: ivy.array([[9., 18., 36., 72.],
                    [9., 18., 36., 72.]]),
      b: ivy.array([[-9., -18., -36., -72.],
                    [-9., -18., -36., -72.]])
  }, {
      a: ivy.array([[1., 1.5, 3., 4.],
                    [10., 15., 30., 40.]]),
      b: ivy.array([[-1., -1.5, -3., -4.],
                    [-10., -15., -30., -40.]])
  }]
  
  >>> values = ivy.Container(
  >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
  >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
  >>> )
  >>> ivy.gradient(values, spacing=2.0)
  [{
      a: ivy.array([[4.5, 9., 18., 36.],
                    [4.5, 9., 18., 36.]]),
      b: ivy.array([[-4.5, -9., -18., -36.],
                    [-4.5, -9., -18., -36.]])
  }, {
      a: ivy.array([[0.5, 0.75, 1.5, 2.],
                    [5., 7.5, 15., 20.]]),
      b: ivy.array([[-0.5, -0.75, -1.5, -2.],
                    [-5., -7.5, -15., -20.]])
  }]
  
  >>> values = ivy.Container(
  >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
  >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
  >>> )
  >>> ivy.gradient(values, axis=1)
  {
      a: ivy.array([[1., 1.5, 3., 4.],
                    [10., 15., 30., 40.]]),
      b: ivy.array([[-1., -1.5, -3., -4.],
                    [-10., -15., -30., -40.]])
  }
  
  >>> values = ivy.Container(
  >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
  >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
  >>> )
  >>> ivy.gradient(values, spacing = [3., 2.])
  [{
      a: ivy.array([[3., 6., 12., 24.],
                    [3., 6., 12., 24.]]),
      b: ivy.array([[-3., -6., -12., -24.],
                    [-3., -6., -12., -24.]])
  }, {
      a: ivy.array([[0.5, 0.75, 1.5, 2.],
                    [5., 7.5, 15., 20.]]),
      b: ivy.array([[-0.5, -0.75, -1.5, -2.],
                    [-5., -7.5, -15., -20.]])
  }]
  
  >>> coords = ivy.Container(
  >>>    a=(ivy.array([0, 2]), ivy.array([0, 3, 6, 9])),
  >>>    b=(ivy.array([0, -2]), ivy.array([0, -3, -6, -9]))
  >>>)
  >>> values = ivy.Container(
  >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
  >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
  >>>)
  >>> ivy.gradient(values, spacing = coords)
  [{
      a: ivy.array([[4.5, 9., 18., 36.],
                    [4.5, 9., 18., 36.]]),
      b: ivy.array([[4.5, 9., 18., 36.],
                    [4.5, 9., 18., 36.]])
  }, {
      a: ivy.array([[0.33333333, 0.5, 1., 1.33333333],
                    [3.33333333, 5., 10., 13.33333333]]),
      b: ivy.array([[0.33333333, 0.5, 1., 1.33333333],
                    [3.33333333, 5., 10., 13.33333333]])
  }]
code: def gradient(
      self: ivy.Container,
      /,
      *,
      spacing: Union[int, list, tuple, ivy.Container] = 1,
      edge_order: Union[int, ivy.Container] = 1,
      axis: Optional[Union[int, list, tuple, ivy.Container]] = None,
  ) -> ivy.Container:
      """Calculate gradient of x with respect to (w.r.t.) spacing.
  
      Parameters
      ----------
          x
              input array representing outcomes of the function
              spacing
              if not given, indices of x will be used
              if scalar indices of x will be scaled with this value
              if array gradient of x w.r.t. spacing
          edge_order
              1 or 2, for 'frist order' and 'second order' estimation
              of boundary values of gradient respectively.
          axis
              dimension(s) to approximate the gradient over.
              By default, partial gradient is computed in every dimension
  
  
      Returns
      -------
      ret
          Array with values computed from gradient function from
          inputs
  
      Examples
      --------
      >>> coordinates = ivy.Container(
      >>>     a=(ivy.array([-2., -1., 1., 4.]),),
      >>>     b=(ivy.array([2., 1., -1., -4.]),)
      >>> )
      >>> values = ivy.Container(
      >>>     a=ivy.array([4., 1., 1., 16.]),
      >>>     b=ivy.array([4., 1., 1., 16.])
      >>> )
      >>> ivy.gradient(values, spacing=coordinates)
      {
          a: ivy.array([-3., -2., 2., 5.]),
          b: ivy.array([3., 2., -2., -5.])
      }
  
      >>> values = ivy.Container(
      >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
      >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
      >>> )
      >>> ivy.gradient(values)
      [{
          a: ivy.array([[9., 18., 36., 72.],
                        [9., 18., 36., 72.]]),
          b: ivy.array([[-9., -18., -36., -72.],
                        [-9., -18., -36., -72.]])
      }, {
          a: ivy.array([[1., 1.5, 3., 4.],
                        [10., 15., 30., 40.]]),
          b: ivy.array([[-1., -1.5, -3., -4.],
                        [-10., -15., -30., -40.]])
      }]
  
      >>> values = ivy.Container(
      >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
      >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
      >>> )
      >>> ivy.gradient(values, spacing=2.0)
      [{
          a: ivy.array([[4.5, 9., 18., 36.],
                        [4.5, 9., 18., 36.]]),
          b: ivy.array([[-4.5, -9., -18., -36.],
                        [-4.5, -9., -18., -36.]])
      }, {
          a: ivy.array([[0.5, 0.75, 1.5, 2.],
                        [5., 7.5, 15., 20.]]),
          b: ivy.array([[-0.5, -0.75, -1.5, -2.],
                        [-5., -7.5, -15., -20.]])
      }]
  
      >>> values = ivy.Container(
      >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
      >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
      >>> )
      >>> ivy.gradient(values, axis=1)
      {
          a: ivy.array([[1., 1.5, 3., 4.],
                        [10., 15., 30., 40.]]),
          b: ivy.array([[-1., -1.5, -3., -4.],
                        [-10., -15., -30., -40.]])
      }
  
      >>> values = ivy.Container(
      >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
      >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
      >>> )
      >>> ivy.gradient(values, spacing = [3., 2.])
      [{
          a: ivy.array([[3., 6., 12., 24.],
                        [3., 6., 12., 24.]]),
          b: ivy.array([[-3., -6., -12., -24.],
                        [-3., -6., -12., -24.]])
      }, {
          a: ivy.array([[0.5, 0.75, 1.5, 2.],
                        [5., 7.5, 15., 20.]]),
          b: ivy.array([[-0.5, -0.75, -1.5, -2.],
                        [-5., -7.5, -15., -20.]])
      }]
  
      >>> coords = ivy.Container(
      >>>    a=(ivy.array([0, 2]), ivy.array([0, 3, 6, 9])),
      >>>    b=(ivy.array([0, -2]), ivy.array([0, -3, -6, -9]))
      >>>)
      >>> values = ivy.Container(
      >>>     a=ivy.array([[1, 2, 4, 8], [10, 20, 40, 80]]),
      >>>     b=ivy.array([[-1, -2, -4, -8], [-10, -20, -40, -80]])
      >>>)
      >>> ivy.gradient(values, spacing = coords)
      [{
          a: ivy.array([[4.5, 9., 18., 36.],
                        [4.5, 9., 18., 36.]]),
          b: ivy.array([[4.5, 9., 18., 36.],
                        [4.5, 9., 18., 36.]])
      }, {
          a: ivy.array([[0.33333333, 0.5, 1., 1.33333333],
                        [3.33333333, 5., 10., 13.33333333]]),
          b: ivy.array([[0.33333333, 0.5, 1., 1.33333333],
                        [3.33333333, 5., 10., 13.33333333]])
      }]
      """
      return self.static_gradient(
          self, spacing=spacing, edge_order=edge_order, axis=axis
      )
  
imports: from typing import Optional, Union, List, Dict, Tuple, Sequence
  from numbers import Number
  import ivy
  from ivy.data_classes.container.base import ContainerBase
label_desc: Use image node_id 36 for calling the _ContainerWithElementWiseExperimental obj's underlying member method code with example usage: obj.gradient() and returns: self