multimodemodel.sum_vars

Contents

multimodemodel.sum_vars#

multimodemodel.sum_vars(variables, keep_time=None)[source]#

Sum variables using optimized implementations.

The grid of the returned Variable will be a reference to the grid attributed of the first object in variables.

See documentation of jit.sum_arr for more information.

Parameters:
  • variables (Sequence[Variable]) – Sequence of variables to sum over.

  • keep_time (Optional[int]) – If None, the resulting time will be the average of the timestamps of the input. If it is an integer, this will be the index of the variable within variables from which the timestep will be copied.