klyn.math.NDArray.histogramDD
method
public histogramDD(bins as Long = 10l, density as Boolean = false, weights as NDArray<Double> = null, ignoreNaN as Boolean = false) as Tuple<NDArray<Double>, IList<NDArray<Double>>>
Description

D-dimensional histogram of an [observations,coordinates] matrix (or 1D series). Coordinates are borrowed as strided columns, not materialized as tensors.

Parameters
ParameterDescription
binsPositive bin count used for every coordinate.
densityNormalize the integral over bin volumes to one.
weightsOptional 1D finite Double weight per observation.
ignoreNaNSkip an observation if any coordinate/weight is NaN.
Returns

Count/density tensor and one independent edge tensor per coordinate.

Throws
  • ValueException for unsupported rank or invalid histogram parameters.
Example

counts, edges = points.histogramDD(bins=10l)