int_binned_stat¶
- rubin_sim.utils.int_binned_stat(ids, values, statistic=<function mean>)¶
Like scipy.binned_statistic, but for unique integer ids.
- Parameters:
- idsarray-like of ints
The integer ID for each value
- valuesarray-like
The values to be combined
- statisticfunction (np.mean)
Function to run on the values that have matching ids.
- Returns:
- unique ids, binned values