Nov-12-2019, 11:26 AM
Hi
In the following example, I'm still trying to find a way to reshape the 2D matrix into a 3D one:
But is reshape the best tool?
Thanks for any advice
Paul
In the following example, I'm still trying to find a way to reshape the 2D matrix into a 3D one:
- the columns remain unchaged
- they are moved in depth column 1 moves to (1, x, x), column 2 moves to (2, x, x) and so on
But is reshape the best tool?
Thanks for any advice
Paul
n = 100 m = 10 # order = 'C' => in line # order = 'F' => in columns A = np.arange(n*m).reshape( (n, m), order='F') B = np.reshape(A, (10,n,1), order='F') C = np.reshape(A, (10,n,1), order='C') D = np.reshape(A, (10,n,1), order='A')