I want to do something like this:
I give a 2D numpy array:
[[ 1, 2, 3],
[ 4, 5, 6],
[ 7, 8, 9]]
And I want to get a 3D numpy array:
[[[1, 1, 1],
[2, 2, 2],
[3, 3, 3]],
[[4, 4, 4],
[5, 5, 5],
[6, 6, 6]],
[[7, 7, 7],
[8, 8, 8],
[9, 9, 9]]]
Does numpy has a function that can do this transformation?