Use array.reverse() instead of custom reverseAxis function.

This was brought up as a potentially better method in pull
request #307.