nanquantile(input: Tensor, q: float | Sequence[float] | Tensor, dim: int | None = None, keepdim: bool = False, interpolation: str = 'linear')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).dimint= NoneAxis along which to reduce.
None (default) reduces over
the flattened input.keepdimbool= FalseRetain the reduced axis as a size-1 dimension. Default
False.interpolationstr= 'linear'Interpolation 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).