I have matrix a which has the shape of [100,100], and matrix b of the same shape [100,100]. They are filled with some values.
What I want to do, is to build such diagonal matrixes [[a1,0],[0,b1]] for each element of a and b.
What is the best to do this?
I belive the expected shape is then array c = [2,2,100,100], where first [2,2] represent the shape of one diagonal matrix, and in total, there are [100,100] of such arrays.
F.e. let's suppose my a = [[1,2],[3,4]], b = [[5,6],[7,8]] . What I wanna get: arr1 = [[1,0],[0,5]], array2 = [[2,0],[0,6]], and so on.. so, in total the final shape is [2,2,4,4]
Thank you!