Mutates the supplied array such that the elements sum to 1.0
Sums the weights. Can be used to process weights