Numpy get positive elements. nonzero(diffs)[0] + 1 Split with the given indexes.