I have created a function to compute weighted sums over functions for the purpose of optimizing the weights in curve fit:
def weighted_sum_of_functions(functions)