


q = torch.tensor([0.25, 0.5, 0.75])
      >>> torch.quantile(a, q, dim=1, keepdim=True)
      tensor([[[-0.5661],
              [ 0.5795]],



          [[ 0.0795],
          [ 0.6706]],

          [[ 0.5280],
          [ 0.9206]]])
  >>> torch.quantile(a, q, dim=1, keepdim=True).shape
  torch.Size([3, 2, 1])
  >>> a = torch.arange(4.)
  >>> a
  tensor([0., 1., 2., 3.])
  >>> torch.quantile(a, 0.6, interpolation='linear')
  tensor(1.8000)
  >>> torch.quantile(a, 0.6, interpolation='lower')
  tensor(1.)
  >>> torch.quantile(a, 0.6, interpolation='higher')
  tensor(2.)
  >>> torch.quantile(a, 0.6, interpolation='midpoint')
  tensor(1.5000)
  >>> torch.quantile(a, 0.6, interpolation='nearest')
  tensor(2.)
  >>> torch.quantile(a, 0.4, interpolation='nearest')
  tensor(1.)
