I am trying to store different images results in a multi-dimensional array. Consider below m has 3 images of size 3x4, now I want to access the second image, I am trying m[:, :, 1]. But it produced wrong results. Can you please correct me on how to access sub array.
m = np.random.random((3,4,3))
array([[[ 0.72474649, 0.88239477, 0.21834498],
[ 0.3594392 , 0.06462519, 0.43329582],
[ 0.83452734, 0.43937307, 0.61267164],
[ 0.75062416, 0.76516036, 0.35487906]],
[[ 0.90644054, 0.22091564, 0.94508058],
[ 0.20201594, 0.60295539, 0.77998197],
[ 0.10496835, 0.77960017, 0.78249163],
[ 0.53903028, 0.81245971, 0.38983454]],
[[ 0.81369716, 0.89243267, 0.49874087],
[ 0.95248644, 0.0847973 , 0.59074351],
[ 0.24507041, 0.03595347, 0.32902477],
[ 0.48906304, 0.14659161, 0.77392082]]])
m[:, :, 1]
// Actual output
array([[ 0.88239477, 0.06462519, 0.43937307, 0.76516036],
[ 0.22091564, 0.60295539, 0.77960017, 0.81245971],
[ 0.89243267, 0.0847973 , 0.03595347, 0.14659161]])
// Expected output
[ 0.90644054, 0.22091564, 0.94508058],
[ 0.20201594, 0.60295539, 0.77998197],
[ 0.10496835, 0.77960017, 0.78249163],
[ 0.53903028, 0.81245971, 0.38983454]
m[1, :, :]m[1].