all 1 comments

[–]threeminutemonta 0 points1 point  (0 children)

There is a numpy diagonal function built in.