how to get last dimension of an array python code example Example: how to get last dimension of an array python slice = myarray[:,:,i]