def consecutive(data, stepsize=1):
    return np.split(data, np.where(np.diff(data) != stepsize)[0] + 1)
a = np.array([0, 47, 48, 49, 50, 97, 98, 99])
how to find the groups of consecutive elements from an array in numpy?