cumsum, cumprod default to dimension 1