clip_to_normalised#

clip_to_normalised(weights)[source]#

If the sum of the weights are not exactly 1, then decrease the largest member to make the same sum 1 precise.

Parameters:

weights (Dict[int, float]) –

Return type:

Dict[int, float]