Here is a nice python trick for indexing from the end, `vol.shape[len(vol.shape)-1] ` is the same as `vol.shape[-1]`. It's pretty handy, plus it works for both python types (tuples, list, ...) and ndarrays.