[SciPy-user] vectorize question
bulatov at cs.orst.edu
bulatov at cs.orst.edu
Fri Aug 6 01:16:05 EDT 2004
What's the best way to evaluate a function at every point of a space (ie, for
plotting purposes)?
For instance, here's how I'd do it in regular python
values=zeros((5,5), Float)
for i in range(5):
for j in range(5):
values[i,j]=some_custom_function(i,j)
plot(values)
Is there some SciPy way of doing it more concisely? I looked at vectorize, but I
can only use it for similar task in 1 dimension.
Yaroslav
More information about the SciPy-User
mailing list