temporal_sum

temporal_sum(arr, skip_na=True)[source]

Compute the sum along the leading time axis of a 1D–4D time‑first array.

Parameters:
  • arr (numpy.ndarray) – Time‑first array (1D–4D).

  • skip_na (bool, default True) – If True, NaNs are excluded.

Returns:

Sum with time axis removed; float64 dtype. Scalar for 1D input.

Return type:

numpy.ndarray