I am trying to get my head around numpy's fancy indexing. While trying to approach the following I am currently unable to solve the problem:
Given the following np.array t.
t = np.array([[6, 1, 8],
[4, 3, 7],
[9, 5, 2]])
I want to achieve the following pattern using fancy indexing
array([[8, 1, 8],
[1, 8, 1],
[8, 1, 8]])
With my closest approach getting to
array([[8, 1, 8],
[8, 1, 8],
[8, 1, 8]])
Using t[:,[2,1,2]][[0,0,0]]
how to tackle such problems?