[Numpy-discussion] apply table lookup to each element
How to apply _cos lookup to each element of an integer array: > > phase = np.array (..., dtype =int) > cos_out = lookup (phase, _cos) ??? Turns out that if A is an np.array and B is an np.array, then A[B] will do exactly what I wanted. Is this mentioned anywhere in the documentation?