Tricky ufunc implementation question

Benjamin Root via NumPy-Discussion <[email protected]>
Newsgroups gmane.comp.python.numeric.general
Message-ID <CANNq6F=9FD6k+N=WWpeWhwN2BwKMCH9R6n-_5w4wXi3LTK0X-w@mail.gmail.com>
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.frompyfunc() on the python version of this function, I keep running into
issues where it wants to make the outputs into object arrays of tuples. And
looking at utilizing PyUFunc_FromFuncAndData, it isn't clear to me how I
can tell it to expect those two output arrays to have a size 3 outer
dimension.

Are ufuncs the wrong thing here? How should I go about this? Is it even
possible?

Thanks in advance,
Ben Root

_______________________________________________
NumPy-Discussion mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/numpy-discussion.python.org
Member address: [email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.