numpy API: flattened flip() (in module numpy) fliplr() (in module numpy) flipud() (in module numpy) flip: flip(m, 0) is equivalent to flipud(m). flip(m, 1) is equivalent to fliplr(m). flip(m, n) corresponds to m[...,::-1,...] with ::-1 at position n.