pyacs.lib.glinalg.dot_and_sum

Compute weighted sum of arrays.

pyacs.lib.glinalg.dot_and_sum.dot_and_sum(LX, a)[source]

Compute weighted sum of arrays (matrix-by-scalar product then sum).

Parameters:
  • LX (list of array_like) – Arrays with the same shape.

  • a (list of float) – Scalars (same length as LX).

Returns:

Sum of a[i] * LX[i].

Return type:

numpy.ndarray