e15190.utilities.fast_histogram.histo2d

e15190.utilities.fast_histogram.histo2d(x, y, range, bins, weights=None)

A wrapper function for fast_histogram.histogram2d()

Parameters
  • x (array-like, shape (N, )) – Input data x.

  • y (array-like, shape (N, )) – Input data y.

  • range (array-like, shape (2, 2)) – The lower and upper range of the bins, [[xmin, xmax], [ymin, ymax]].

  • bins ([int, int]) – The number of bins, [x_bins, y_bins].

  • weights (array-like of shape (N, ), default None) – Weights for each (x, y) pair.

Returns

bin_contents – The bin contents.

Return type

2D array of shape (bins[0], bins[1])