fast way to put ones beetween ones in each row of a numpy 2d array,"np.maximum.accumulate(Q[:, ::-1], axis=1)[:, ::-1]"