[Numpy-discussion] apply table lookup to each element