reverse - reverse an array along an axis
arr.reverse()
arr.reverse(axis)
The reverse() method reverses the order of
elements in arr along the specified axis. This is
similar to APL
⌽ arr and
⌽[axis]arr.
If axis is not provided, it defaults to the last dimension (-1).
A new array with the elements reversed along the specified axis.
ArgCheck if the number of arguments is
incorrect
RangeCheck if axis is out
of the valid range of dimensions
a = [1:5]
a.reverse()
5 4 3 2 1
b = [2, 2].iterate()
b.reverse(0)
2 3
0 1