def flip_axis(x, axis):
    x = np.asarray(x).swapaxes(axis, 0)
    x = x[::(- 1), ...]
    x = x.swapaxes(0, axis)
    return x
def flip_axis(x, axis):
    x = np.asarray(x).swapaxes(axis, 0)
    x = x[::(- 1), ...]
    x = x.swapaxes(0, axis)
    return x