[f2py] f2py with C multidimensional array

Richard Shaw jrs65 at cam.ac.uk
Thu Mar 8 16:47:32 EET 2007


On Thu, 2007-03-08 at 11:04, Richard Shaw wrote:

> My question is what exactly does f2py pass in? Is it just a flat double
> array (eg. [x00, x01, x03, .... x10, x11, x12,....]) or does it have all
> the pointers set for proper multidimensional access, such that the above
> is valid. At the moment the segfaults I'm getting would seem to indicate
> the former. But this isn't entirely clear to me.

I think I've answered my own question. After some experimentation it
seems that it does indeed just pass in a flattened 1d array.

Anyway, cheers for f2py. It's just got me a 200x speedup on a critical
piece of code!

Thanks,
Richard




More information about the f2py-users mailing list