Manually merge weightedAverage from 0.10.0.