Numarray newbie question

ChinStrap caneff at gmail.com
Tue Mar 29 01:33:28 EST 2005


I know there are probably alternatives for this with the standard
library, but I think that would kill the speed I get with numarray:

Say I have two 2-dimensional numarrays (x_mat and y_mat, say), and a
function f(x,y) that I would like to evaluate at every index.
Basically I want to be able to say f(x_mat,y_mat) and have it return a
numarray with the same shape and element wise evaluation of f.  I know,
I want a ufunc, but they look scary to write my own. Are there any
functions that do this? Or is writing ufuncs easier than it seems?

Thanks,
-Chris Neff




More information about the Python-list mailing list