I'm operating on a numpy 2-d array and trying to find some way to access different slices per row. Preferably exploiting numpy broadcasting in such a way that I pass an array of slices like follows:
A = np.array([[1,2,3,4,5],[1,4,9,16,25],[1,8,27,64,125]])
A[[2:,3:,4:]]
>>> array([[3,4,5],[16,25],[125]])
I know what I wrote above is bogus, but you get the point. I'd like to pass in an array t = [2,3,4] so that each member of that array (denote by t_i) results in t_i: (that member and a colon after).
Thanks