Added swapaxes function.