You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's suppose you want to define a gufunc from within Python. We need two parts: The type resolution function, and the actual loop. So for example:
deftyperes(*input_types):
# Perform some operation with input types.returnoutput_typesdefloop(*all_allocated_arrays):
# Perform all operations, store in last arrray(s) as output.
So, the type resolution function will be called and then all the output arrays allocated. Let's say we pass in two 5 * int64 arrays. And then, loop gets passed in all four 5 * int64 arrays, and there's no looping in Python, only in C.
Then, what happens is: out1, out2 is returned from the gufunc.
The text was updated successfully, but these errors were encountered:
Let's suppose you want to define a
gufunc
from within Python. We need two parts: The type resolution function, and the actual loop. So for example:For example,
divmod
:So, the type resolution function will be called and then all the output arrays allocated. Let's say we pass in two
5 * int64
arrays. And then,loop
gets passed in all four5 * int64
arrays, and there's no looping in Python, only in C.Then, what happens is:
out1, out2
is returned from thegufunc
.The text was updated successfully, but these errors were encountered: