nanquantile(input: Tensor, q: _float | Sequence[_float] | Tensor, dim: _int | None = ..., keepdim: _bool = ..., interpolation: str = ...)NaN-aware quantile — same interface as quantile, but
every NaN is excluded from the sort and the per-axis quantile
is computed over the remaining values.
Parameters
inputTensorReal-valued input.
NaN entries are masked out before
sorting.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.interpolationstrInterpolation rule between two surrounding samples. Currently
"linear" is supported (default).Returns
TensorSame dtype as input; shape depends on q / dim /
keepdim. Returns NaN for slices that contain only
NaN values.
See Also
quantile—NaN-unaware version (a singleNaNpoisons the slice).