I have looked into documentations and also other questions here, but it seems I have not got the hang of subsetting in numpy arrays yet.
I have a numpy array, and
Another quick way to build the desired index is to use the np.ix_ function:
>>> a[np.ix_(n1, n2)] array([[ 0, 1, 2, 3, 4], [10, 11, 12, 13, 14], [20, 21, 22, 23, 24], [30, 31, 32, 33, 34], [40, 41, 42, 43, 44]])
This provides a convenient way to construct an open mesh from sequences of indices.