I was looking at sampling algorithms, and realised it was overkill for my task. Instead I found a useful numpy feature –
import numpy as np
my_array = np.array([1,2, 3, 4, 5, 6, 7, 8, 9, 10,11,12])
my_array = np.delete(x, np.arange(0, x.size, 3))
Output -
[2 3 5 6 8 9 11 12]
Here we remove every 3rd element! Easy!
Like this:
Like Loading...