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