I want to extract rows and columns from a matrix using one βfancyβ fragment, is this possible?
m = matrix([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
My goal
matrix([[1, 3], [7, 9]])
Where i have a list of items i want
d = [0,2]
I can achieve functionality
m[d][:,d]
But is there a simpler expression?
source share