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

Joint histogram of paired 1D observations, without an N-by-2 temporary.

Parameters
ParameterDescription
otherSecond coordinate series, same numeric type and length.
binsPositive number of bins per coordinate.
densityNormalize by included weight and cell area.
weightsOptional finite Double weight per observation.
ignoreNaNSkip entire pairs containing NaNs; otherwise raise.
Returns

Tuple of [xBins,yBins] counts/densities, x edges, y edges.

Throws
  • ValueException for mismatched/non-1D inputs or invalid histogram parameters.
  • NullException if other is null at runtime; statically null arguments are rejected with TypeError.
Example

counts, xEdges, yEdges = x.histogram2D(y, bins=10l)