Let's say I have a multidimensional array with a shape that I don't know until runtime.
How can I reverse it along a given axis k, also not known until runtime?
The notation somearray[:,:,::-1,:,:] relies on static dimension references, as in this other SO question, so I can't use it here.