numpy 2d array: change all values to the right of nans,"arr[np.maximum.accumulate(np.isnan(arr), axis=1)] = np.nan"