tensor([[ 0.3333, 0.5000, 1.0000, 1.3333],
               [ 3.3333, 5.0000, 10.0000, 13.3333]]))
  >>> # The following example is a replication of the previous one with explicit
  >>> # coordinates.
  >>> coords = (torch.tensor([0, 2]), torch.tensor([0, 3, 6, 9]))
  >>> torch.gradient(t, spacing = coords)
  (tensor([[ 4.5000, 9.0000, 18.0000, 36.0000],
           [ 4.5000, 9.0000, 18.0000, 36.0000]]),
   tensor([[ 0.3333, 0.5000, 1.0000, 1.3333],
           [ 3.3333, 5.0000, 10.0000, 13.3333]]))
