def rotate_array_270(arr):
    """Rotate array 270 degrees

    Args:
        arr (numpy.array): input array

    Returns:
        numpy.array: rotated array
    """
    axes_order = list(range(arr.ndim - 2)) + [arr.ndim - 1, arr.ndim - 2]
    slices = [slice(None) for _ in range(arr.ndim - 2)] + \
             [slice(None, None, -1), slice(None)]
    return arr[tuple(slices)].transpose(axes_order)