Splitting Numpy array based on value,zeros = np.where(a == 0)[0]