root_numpy.fill_profile

root_numpy.fill_profile(profile, array, weights=None, return_indices=False)

Fill a ROOT profile with a NumPy array.

Parameters:

profile : ROOT TProfile, TProfile2D, or TProfile3D

The ROOT profile to fill.

array : numpy array of shape [n_samples, n_dimensions]

The values to fill the histogram with. There must be one more column than the dimensionality of the profile.

weights : numpy array

A flat numpy array of weights for each sample in array.

return_indices : bool, optional (default=False)

If True then return an array of the bin indices filled for each element in array.

Returns:

indices : numpy array or None

If return_indices is True, then return an array of the bin indices filled for each element in array otherwise return None.