I have to define a huge sparse matrix, which row index of the matrix is a 5 vector of size 5 and column index of of the matrix is also a vector of size 5. To be more specific, To retrieve an element in this matrix I need to know two vectors:
- One is a vector for row, let's call it
(i,j,k,l,m)
. Wherei=1,...,20,j=1,...,10, k=1,...,10, l=1,...,10, m=1,...,10.
One for column, let's call it
(n,o,p,q,r)
. Where Similarly,n=1,...,20, o=1,...,10, p=1,...,10, q=1,...,10, r=1,...,10
.I am trying to implement the idea of dictionary of dictionaries where each key of the
Dict_1
dictionary refers to another dictionary, let's call itDict_2
. Where keys ofDict_1
are vectors for row and keys ofDict_2
are vectors for column.
I really appreciate any hint or help in defining this dictionary. I look into What is the best way to implement nested dictionaries in Python? but couldn't figure out how to extend that idea to the case where my row and column keys are vectors. I really appreciate any help, comment.