Re: [Numpy-discussion] Getting Callbacks with arrays to work

2010-01-14 Thread Jon Moore
f dV(v): > print 'in Python dV: V is: ',v > ret = v.copy() > ret[1] = 100.0 > return ret > ... >>>> output = callbacktest(dV, arr) > in Python dV: V is: [ 2. 4. 6. 8.] >>>> output > array([ 2., 100.,6.,

[Numpy-discussion] Getting Callbacks with arrays to work

2010-01-12 Thread Jon Moore
Hi, I'm trying to build a differential equation integrator and later a stochastic differential equation integrator. I'm having trouble getting f2py to work where the callback itself receives an array from the Fortran routine does some work on it and then passes an array back.   For the stoach