torch.quantile
torch.quantile(input, q, dim=None, keepdim=False, *, interpolation='linear', out=None) -> Tensor
Computes the q-th quantiles of each row of the "input" tensor along
   the dimension "dim".
To compute the quantile, we map q in [0, 1] to the range of indices
   [0, n] to find the location of the quantile in the sorted input. If
   the quantile lies between two data points "a < b" with indices "i"
   and "j" in the sorted order, result is computed according to the
   given "interpolation" method as follows:


"linear": "a + (b - a) * fraction", where "fraction" is the
     fractional part of the computed quantile index.


"lower": "a".


"higher": "b".


"nearest": "a" or "b", whichever's index is closer to the
     computed quantile index (rounding down for .5 fractions).


"midpoint": "(a + b) / 2".


If "q" is a 1D tensor, the first dimension of the output represents
   the quantiles and has size equal to the size of "q", the remaining