klyn.math.NDArray.percentile
method
public percentile(notnull q as IList<Double>, axis as Long, method as QuantileMethod = QuantileMethod.Linear, keepDims as Boolean = false, ignoreNaN as Boolean = false, where as Boolean[] = null) as NDArray<Double>
Description

Multiple percentiles along one axis; sample scratch is shared across requests.

Parameters
ParameterDescription
qNon-empty probabilities in [0,100].
axisPositive/negative axis to reduce.
methodInterpolation method, Linear by default.
keepDimsKeep the reduced dimension with length one.
ignoreNaNSkip NaNs, otherwise propagate them.
whereOptional flat Boolean mask matching the source size.
Returns

Double tensor with requested percentiles on its leading axis.

Throws
  • IndexException for an invalid axis.
  • ValueException for invalid probabilities/mask or no observations.
  • NullException if q is null at runtime; statically null arguments are rejected with TypeError.
Example

quartiles = data.percentile([25.0, 50.0, 75.0], axis=1l)