Numeric N-dimensional array initialization

TG girodt at gmail.com
Thu Jun 22 14:15:55 EDT 2006


I tried to use Numeric.fromfunction, but there seems to be a problem :

the function called must have the right number of args (hint : the
number of dimensions, which I don't know). So i tried to use a function
like :

def myfunc(*args, **kw):
     return 0

and then i get :

>> Numeric.fromfunction(myfunc,(5,5))
0

I'm a bit puzzled here




More information about the Python-list mailing list