Perform a reverse cumulative sum on a numpy array July 30, 2023 by Tarik This does it: np.cumsum(x[::-1])[::-1]