What is the simplest way in numpy to reverse the most inner values of an array like this:
array([[[1, 1, 1, 2],
[2, 2, 2, 3],
[3, 3, 3, 4]],
[[1, 1, 1, 2],
[2, 2, 2, 3],
[3, 3, 3, 4]]])
so that I get the following result:
array([[[2, 1, 1, 1],
[3, 2, 2, 2],
[4, 3, 3, 3]],
[[2, 1, 1, 1],
[3, 2, 2, 2],
[4, 3, 3, 3]]])
Thank you very much!
See Question&Answers more detail:
os