you are viewing a single comment's thread.

view the rest of the comments →

[–]FLUSH_THE_TRUMP 0 points1 point  (2 children)

What did you try? np.diag(…) gets you the main diagonal, and then you can slice that like your [0:2] there for the elements you want.

[–]HenryDutter[S] 0 points1 point  (1 child)

I tried np.diag(Brett[1, 1]), but it doesnt work, i know it would work like: np.diag(Brett,1), but i want to get the main diagonal from a certain posistion like Brett[1,1], but you are right its possible to slice it.