What is the best way, to address a non-contiguous sub-array without using an explicit loop. I have an array, say m = np.arange(16).reshape(4,4) and I am interested in the sub-array with row/column index, say [0,1,3].
One way to address this sub-array is
>>> import numpy as np
However, this returns a copy of the sub-matrix and therefore can't be used to assign a value, say 0.
Do i have to use an explicit loop, such as
>>> for i in idx: m[i][:,idx] = 0
Thanks, Kilian

