hist2d_numba_seq¶
- HSTB.kluster.numba_helpers.hist2d_numba_seq(x, y, bins, ranges)¶
Custom function to build a histogram2d using numba. Take provided bins and ranges and return count at each 2d bin location.
x = np.random.uniform(0, 100, size=1000000) y = np.random.uniform(0, 100, size=1000000)
bins = np.array([99, 99]) ranges = np.array([[0, 100], [0, 100]])
hist2d_numba_seq(x, y, bins, ranges)
- Parameters
x (
array) – numpy array, 1d x valuey (
array) – numpy array, 1d y valuebins (
ndarray) – numpy ndarray, 2d bin locationsranges (
ndarray) – numpy ndarray, 2d ranges
- Returns
2d histogram with counts per bin for x and y
- Return type
np.ndarray