map

Giorgi Lekishvili gleki at gol.ge
Fri Jun 7 05:01:26 EDT 2002


Hi all!

Is there a way to map a function with several arguments to a list? E.g.,

>>>import math
>>>import MLab
>>>a=MLab.rand(3,5)
>>>b=map(math.pow,a)

of course, this doesn't work.

What to do? My task is to optimize the power (i.e., y in pow(x,y)) to
achieve maximal performance.


thanx,
Giorgi

PS: Perhaps I have missed the needed functionality, that's presented in
NumPy?






More information about the Python-list mailing list