

dim ("int", "list of int", optional) -- the dimension or
        dimensions to approximate the gradient over.  By default the
        partial  gradient in every dimension is computed. Note that
        when "dim" is  specified the elements of the "spacing"
        argument must correspond with the specified dims."

edge_order ("int", optional) -- 1 or 2, for first-order or
    second-order estimation of the boundary ("edge") values,
    respectively.



Examples:
  >>> # Estimates the gradient of f(x)=x^2 at points [-2, -1, 2, 4]
  >>> coordinates = (torch.tensor([-2., -1., 1., 4.]),)
  >>> values = torch.tensor([4., 1., 1., 16.], )
  >>> torch.gradient(values, spacing = coordinates)
  (tensor([-3., -2., 2., 5.]),)

  >>> # Estimates the gradient of the R^2 -> R function whose samples are
  >>> # described by the tensor t. Implicit coordinates are [0, 1] for the outermost
