What is the most efficient way to mask columns from a numpy array?
a = np.arange(12).reshape((3,4))
mask = [True False True False]
I'm looking for something like:
b = a[mask, axis=1]
which would give the output:
b = [[0, 2],[4, 6], [8, 10]]
I need this for a large array.
Thanks,