[Numpy-discussion] optimising single value functions for array calculations
Mon Dec 1 07:38:23 CST 2008
thanks for all your answers. I will certainly test it.
> numpy.vectorize(myfunc) should do what you want.
Just to add a better example based on a recent
discussion here on this list :
res = math.sin(x)
a = numpy.arange(1,20)
=> myfunc(a) will not work.
=> myfunc need to have a possibility to pass single
values to math.sin either through interation
(see my inital email) or through other options.
(I know that numpy has a array aware sinus but
wanted to use it as an example here.)
My orriginal problem evolves from here timeseries
Well, I will test and report back further.
Thanks again and until soon,
More information about the Numpy-discussion