Given:
M = [[1, 2],
[3, 4]]
N = [[(0,1), (1, 0)],
[(1,1), (0,0)]]
With M and N, both of dimension 2x2. How might I get a list L, of tuples, where each tuple is the combination of the position of the value, and the values from M and N:
L = [((0,0), (0,1), 1) ...]
Where the first entry above in L, is the position (0,0) in M and N, and the tuple/value (0,1) from N, and the value 1 from M.
Do I need to stack M, N to create a third dimension? And does numpy have a clean and efficient way to produce such a list of tuples?
Ljust map the index to the values. That is no additional information if you already haveMandN, since you can just indexMandNdirectly without storing the mapping, so you don't needLat all. What exactly are you trying to do?