[Numpy-discussion] numpy array to C API
Thu Mar 21 05:14:16 CDT 2013
On 21/03/2013 10:16, Valentin Haenel wrote:
> Dear Daniele
> * 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
>> Hello Valentin,
>> 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...
More information about the NumPy-Discussion