I\'m writting a Cython wrapper to a C function. I have a pxd file with the following signature:
double contr_hrr(int lena, double xa, double ya, double za, doubl
What I finally did was to make sure that the anorms arrays were maintained as arrays in the python part of the code, and then followed Nikita's recipe to convert them on the fly to doubles using the .data.as_doubles property. If I do this, it appears to have very little overhead compared to doing everything natively in C.
Haven't yet experimented with the numpy approach, for a variety of mundane reasons.