I'm trying to find an efficient way to explicitly exclude a list of columns from a numpy array. I'm aware that in R by placing the "minus" sing before c() you can specify what columns not to include from a data frame
I have tried using "~" before the list of index of columns I do not want to include with no results
For example I'm going to generate an array with sklearn
X,_ = make_blobs(n_samples= size, n_features= 12, centers= 2,
cluster_std= 10, random_state= 2)
I want somehow to indicate that I want to keep all the columns except for the 10,3 and 9 for X
How Can I achieve that without doing this:
X[:, [6,7,4,2,0,1,11,8,5]]