[Numpy-discussion] vectorized function inside a class
Wed Aug 8 15:53:28 CDT 2007
On 08/08/2007, mark <email@example.com> wrote:
> Thanks for the ideas to circumvent vectorization.
> But the real function I need to vectorize is quite a bit more
> So I would really like to use vectorize.
> Are there any reasons against vectorization? Is it slow?
> The way Tim suggests I expect to be slow as there are two functions
vectorize() is just shorthand for a for loop, basically; it won't win
you anything on speed over looping yourself. It does win on
convenience, but if you can write your function to act on arrays it
will run much faster.
More information about the Numpy-discussion