Table of Contents

Struct np.HistogramResult

Namespace
NumSharp
Assembly
NumSharp.dll

The two arrays NumPy's histogram returns: the per-bin values and the bin edges. Converts implicitly to NDArray (the histogram values — the primary result) and to NDArray[] ([hist, bin_edges]), and deconstructs as var (hist, edges) = np.histogram(a); so ported NumPy call shapes read verbatim.

public readonly struct np.HistogramResult : INDArrayCarrier
Implements
Inherited Members

Fields

bin_edges

The bin edges (length = hist.size + 1).

public readonly NDArray bin_edges

Field Value

NDArray

hist

The histogram values: sample counts (int64) or, with weights, summed weights.

public readonly NDArray hist

Field Value

NDArray

Methods

Deconstruct(out NDArray, out NDArray)

Deconstructs into (hist, bin_edges).

public void Deconstruct(out NDArray hist, out NDArray binEdges)

Parameters

hist NDArray

Receives the histogram values.

binEdges NDArray

Receives the bin edges.

Operators

implicit operator NDArray(HistogramResult)

Yields the primary result — the histogram values.

public static implicit operator NDArray(np.HistogramResult r)

Parameters

r np.HistogramResult

The result to unwrap.

Returns

NDArray

implicit operator NDArray[](HistogramResult)

Yields both arrays in NumPy field order [hist, bin_edges].

public static implicit operator NDArray[](np.HistogramResult r)

Parameters

r np.HistogramResult

The result to unwrap.

Returns

NDArray[]