Say I have several arrays, potentially of different sizes:
A0 = rand(3,3)
A1 = rand(4,4)
In Cython, I can declare their types to get fast item access:
cdef np.ndarray[double, ndim=2] A0
cdef np.ndarray[double, ndim=2] A1
However, say I want to access them by index:
A = (A0,A1)
A[0][2,1] += A[1][1,0]
However, now Cython doesn't know the type of A[0] and A[1], which makes access slow. I don't think Cython has the concept of a "typed tuple". So how can I declare A (or a similar object) so that I still get fast item access in the above expression?