gncpy.math.weighted_sum_vec
- weighted_sum_vec(w_lst, x_lst)[source]
Calculates the weighted sum of a list of vectors.
- Parameters:
w_lst (list of floats, or N numpy array) – list of weights.
x_lst (list of n x 1 numpy arrays, or N x n x 1 numpy array) – list of vectors to be weighted and summed.
- Returns:
w_sum – weighted sum of inputs.
- Return type:
n x 1 numpy array