Table of Contents

Delegate DirectILKernelGenerator.HistogramWeightedKernel

Namespace
NumSharp.Backends.Kernels
Assembly
NumSharp.dll

Fused weighted histogram scatter for equal-width bins: for each in-range sample, add its (float64) weight to the bin's running float64 total. Runs over ONE block; the caller casts the total to the weight dtype and folds it into the result, replicating NumPy's per-block n += bincount(block, w).astype(ntype) — no int64 indices array, no separate bincount pass.

public delegate void DirectILKernelGenerator.HistogramWeightedKernel(void* samples, void* weights, long count, void* binEdges, double first, double last, int nbins, double* totals)

Parameters

samples void*

Contiguous block of samples in dtype B.

weights void*

Contiguous block of float64 weights (same length).

count long

Block length.

binEdges void*

Contiguous nbins+1 bin edges in dtype B.

first double

Lower outer edge (double).

last double

Upper outer edge (double).

nbins int

Number of bins.

totals double*

Output float64 per-bin totals of length nbins (pre-zeroed by the caller).