flip3D function

Flip a 3D array along an axis.