Optimisation problem - in C?
Johann Hibschman
johann at physics.berkeley.edu
Tue Feb 20 15:09:33 EST 2001
Tim Churches writes:
> Questions:
> Can this function (which essentially does the fairly generic operation
> of "fetch the elements of sequence a using the element indexes contained
> in sequence b") be optimised without resorting to a C module?
The Numeric module has a "take" function, which does exactly what you
want.
You will have to convert your lists into numeric arrays of python
objects, but that shouldn't be difficult.
--J
--
Johann Hibschman johann at physics.berkeley.edu
More information about the Python-list
mailing list