scipp.bins_like#

scipp.bins_like(x, fill_value)#

Create a binned variable by “broadcasting” fill values to bins of given sizes.

The dimensions and shape of fill_value must be such that they can be broadcast to those of x. Each element of fill_value defines the values of all the bin elements of the corresponding bin. The output shares the bin indices of x.

Parameters:
Returns:

Variable – Variable containing fill value in bins.