quantile(input: Tensor, q: _float | Sequence[_float] | Tensor, dim: _int | None = ..., keepdim: _bool = ..., interpolation: str = ...)Compute the q-th quantile of input.
Parameters
inputTensorReal-valued input.
qfloat, sequence of float, or TensorQuantile(s) in . A single
q returns a tensor
without the leading quantile axis; a sequence/tensor adds a
leading axis of length len(q).dimintAxis along which to reduce.
None (default) reduces over
the flattened input.keepdimboolRetain the reduced axis as a size-1 dimension. Default
False.interpolationstrRule for interpolating between the two samples bracketing the
quantile. One of
'linear' (default), 'lower',
'higher', 'midpoint', 'nearest'.Returns
TensorSame dtype as input. Shape depends on q / dim /
keepdim.
See Also
nanquantile—NaN-aware sibling.