[Numpy-discussion] Handle type convertion in C API

2020-03-10 Thread Benoit Gschwind
Hello, I writing a python binding of one of our library. The binding intend to vectorize the function call. for exemple: double foo(double, double) will be bound to a python: module.foo(, ) and the function foo will be called like : for (int i = 0; i < size; ++i) outarr[i] = foo(inarr

Re: [Numpy-discussion] Handle type convertion in C API

2020-03-10 Thread Eric Moore
Hi Benoit, Since you have a function that takes two scalars to one scalar, it sounds to me as though you would be best off creating a ufunc. This will then handle the conversion to and looping over the arrays, etc for you. The documentation is available here: https://numpy.org/doc/1.18/user/c-in

[Numpy-discussion] NumPy Development Meeting - Triage Focus

2020-03-10 Thread Sebastian Berg
Hi all, (Note that the US has switched to daylight saving time) Our bi-weekly triage-focused NumPy development meeting is tomorrow (Wednesday, Februrary 26) at 11 am Pacific Time. Everyone is invited to join in and edit the work-in-progress meeting topics and notes: https://hackmd.io/68i_JvOYQfy9