I have an operation that I\'m doing commonly which I\'m calling a \"jagged-slice\" because I don\'t know the real name for it. It\'s best explained by example:
The elements in jagged_slice_of_a are the diagonal elements of a[:,entries_of_interest]
jagged_slice_of_a
a[:,entries_of_interest]
A slightly less cumbersome way of doing this would therefore be to use np.diagonal to extract them.
jagged_slice_of_a = a[:, entries_of_interest].diagonal()