[ 6.0,  8.0, 10.0]])
  >>> # Cumulatively computes the trapezoidal rule for each row of a 3x3 ones matrix
  >>> #   with the same arbitrary spacing
  >>> y = torch.ones(3, 3)
  >>> x = torch.tensor([1, 3, 6])
  >>> torch.cumulative_trapezoid(y, x)
  tensor([[2., 5.],
          [2., 5.],
          [2., 5.]])

  >>> # Cumulatively computes the trapezoidal rule for each row of a 3x3 ones matrix
  >>> #   with different arbitrary spacing per row
  >>> y = torch.ones(3, 3)
  >>> x = torch.tensor([[1, 2, 3], [1, 3, 5], [1, 4, 7]])
  >>> torch.cumulative_trapezoid(y, x)
  tensor([[1., 2.],
          [2., 4.],
          [3., 6.]])
