Wrap each entry of dims through wrap_dim, keeping the order, and refuse a list that names one axis twice, as the reference does. An op that walks the list (flip) would otherwise act on that axis twice and undo itself.
Raises
IndexErrorSome entry of
dims is refused by wrap_dim.LucidErrorTwo entries name the same axis.