I want to subset a d = (d1,...,dn)-shaped numpy array A to get only the r = (r1,...,rn) first principal minor, i.e all values A[i1,...,in] such that ij < rj. The resulting array has shape r, of course.
How can i do that ? I tried A[:r] but of course it did not work :). The right way would be A[:r1,...,:rn], but len(A.shape) is unknown, so i cant write all subsetting one by one.
Do you have an idea on how i could get this submatrix ?