arkane 0 Newbie Poster

I am a little new to extending python with C. I have been successful at creating modules that take integers, etc and return a value but I am a little confused about passing a numpy array to a C function. I am using swig to generate the wrappers, and handle the linking, if someone knows a straightforward way to accomplish this that would be great.

Basically I want to pass in a numpy array of say 1 million floats, loop over the array several times preforming a calculation then return a numpy array.

Thanks

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.