Let's say there is a binned data array with two coordinates, one lives "on the binning" (x) and one lives "on the events" (y) and the intention of the user is to create a 2D histogram over y and x.
If the outer binning is large it is easy to run into a situation where performance drops drastically, or the process runs out of memory, for example:
import scipp as sc
# 1 million bins
da = sc.data.binned_x(1000_000, 1000_000)
da.hist(x=200, y=200, dim=da.dims)
# This works.
# Different argument order
da.hist(y=200, x=200, dim=da.dims)
# This crashes the kernel (I assume it OOMs because it tries to create a large intermediate binning).
Let's say there is a binned data array with two coordinates, one lives "on the binning" (
x) and one lives "on the events" (y) and the intention of the user is to create a 2D histogram over y and x.If the outer binning is large it is easy to run into a situation where performance drops drastically, or the process runs out of memory, for example: