Delete a series of elements every nth time in numpy array
问题 I know how to delete every 4th element in a numpy array: frame = np.delete(frame,np.arange(4,frame.size,4)) Now I want to know if there is a simple command that can delete every nth (e.g 4) times 3 values. A basic example: input: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20....] Would lead to: output: [1,2,3,7,8,9,13,14,15,19,20,....] I was hoping for a simple numpy / python functionality, rather than writing a function that has to iterate over the vector (cause it is quite long in my