numpy get the first layer of specific dimenstion code example Example: how to get last dimension of an array python slice = myarray[:,:,i]