numba_histogram¶
- mdcraft.algorithm.accelerated.numba_histogram(array: ndarray[float], n_bins: int, bin_edges: ndarray[float]) ndarray[int][source]¶
Serial Numba-accelerated function to compute the histogram of a one-dimensional NumPy array \(\mathbf{a}\) using predetermined bin edges for \(N_\mathrm{bins}\) bins.
- Parameters:
- arraynp.ndarray
One-dimensional array \(\mathbf{a}\).
- n_binsint
Number of bins \(N_\mathrm{bins}\).
- bin_edgesnp.ndarray
Bin edges.
- Returns:
- histogram_np.ndarray
Histogram of the array \(\mathbf{a}\).