* Daniele Nicolodi email@example.com [2013-03-21]:
On 21/03/2013 10:16, Valentin Haenel wrote:
- Daniele Nicolodi firstname.lastname@example.org [2013-03-21]:
On 21/03/2013 09:45, Valentin Haenel wrote:
if you are new to interfacing python/numpy with C/C++, you may want to check out:
Disclaimer: I am the author of this chapter, so this response is a bit of a shameless plug :D
I had a quick look at the chapter. It looks good! Thanks for sharing it.
However I have a small comment on the way you implement the Cython-Numpy solution. I would have written the loop over the array element in Cython itself rather than in a separately compiled C function. This would have the advantage of presenting more capabilities of Cython and would slightly decrease the complexity of the solution (one source file instead of two).
Thanks very much for your feedback! Since the chapter in under a CC licence, you are welcome to submit your proposal as a Pull-Request. :D
The reason why I wrote the loop in C is so that the cython example synergieses with the others. The ideas is, that you have an already existing code-base that has a function which has such a signature. Ideally, your proposal would be an improvement, where the original example stays in place and you develop the improvement including reasons as to why it is better. ;)
I understand the reasoning behind your choice. I'm adding sending you a patch with this addition to my todo list, but I don't really know when I will have time to work on it...
Aye, that would be great! No need to rush -- you can also throw a feature request into the project issue tracker, <wishful_thinking> maybe someone else will grab it. </wishful_thinking>