I am having a 2d array with size mxn
I want to convert each column into a seperate 2d diagonal matrix--- a total of 'n' diagonal matrices of size mxm
Then combining all the 2d diagonal matrices as a single 3d matrix.---size mxmxn
I tried to do this with employing a for-loop but it is taking lot of time
Can this be done without using a loop and at a faster speed?