[Numpy-discussion] Re: Tricky ufunc implementation question

2025-06-27 Thread Benjamin Root via NumPy-Discussion
Warren, I'm fine with implementing it in C. I just didn't think gufuncs were for me. I couldn't tell from the description if it would be for my usecase since I wasn't looping over subarrays, and I didn't see any good examples. Maybe the documentation could be clearer. I'll have a look at your exam

[Numpy-discussion] Tricky ufunc implementation question

2025-06-27 Thread Benjamin Root via NumPy-Discussion
I'm looking at a situation where I like to wrap a C++ function that takes two doubles as inputs, and returns an error code, a position vector, and a velocity vector so that I essentially would have a function signature of (N), (N) -> (N), (N, 3), (N, 3). When I try to use np.vectorize() or np.fromp

[Numpy-discussion] Re: Tricky ufunc implementation question

2025-06-27 Thread Warren Weckesser via NumPy-Discussion
On Fri, Jun 27, 2025 at 5:29 PM Benjamin Root via NumPy-Discussion wrote: > > I'm looking at a situation where I like to wrap a C++ function that takes two > doubles as inputs, and returns an error code, a position vector, and a > velocity vector so that I essentially would have a function signa