Hi,<br><br>I have a NumPy array.  The array is 3D, n x n x 3.  I'm trying to flip the first element of the last dimension with the last.  I tried:<br><span style="font-family: courier new,monospace;">temp = myarray[:,:,0].copy()</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">myarray[:,:,0] = myarray[:,:,2].copy()</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">myarray[:,:,2] = temp</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">del temp</span><br>But it doesn't work as expected.  <br><br>I'm definitely not very good at NumPy, so I get the feeling it's something silly I'm doing.  What should that code look like?<br>

<br>Thanks,<br>Ian<br>