def _flip_lr(x):
    "Flip `x` horizontally."
    #return x.flip(2)
    if isinstance(x, ImagePoints):
        x.flow.flow[...,0] *= -1
        return x
    return tensor(np.ascontiguousarray(np.array(x)[...,::-1]))
def _flip_lr ( x ) : if isinstance ( x , ImagePoints ) : x . flow . flow [ ... , 0 ] *= - 1 return x return tensor ( np . ascontiguousarray ( np . array ( x ) [ ... , : : - 1 ] ) )
Flip `x` horizontally.