We need to change the inner loop functions in NumPy, including how they are stored and their signature. While doing that it should be possible to keep old loops working as they are (at a speed penalty maybe).
I realize that Numba is a fast moving project, and that you are probably adapt to a change in NumPy, but maybe we can make things work to make the transition smooth.
So I have two questions (currently):
I know that Numba messes with the internal structure of ufuncs for the ufuncs created by numba itself. But does it access the inner-loops of universal functions not created by Numba itself? E.g. extracting the loop two add two float64?
We have to add an error return value to loops and wish to pass additional information into the UFunc loop, either by extending the signature or passing a structure (or, not unlikely) both, e.g.:
int ufunc_loop(char **args, npy_intp const *dimensions, npy_intp const *steps, new_info_struct *info, void *user_data)
do you have any needs/limitations or just ideas on this? I am in the process of revising this, but e.g. the idea is to always pass in all
dtypes, because it makes implementing parametric DTypes (e.g. Units) much easier. Even the return value could be a discussion point, does numba have a need to do more than return
-1with a Python error set? (e.g. I could see returning a positive value to abort an unnecessary iteration, but would defer it in case we find a better usage)
I realize this is a technical deep-dive maybe, so please let me know if this is unclear. I am revising NEP 43 here: https://github.com/numpy/numpy/pull/16723, but unless you are enthusiastic, it may be best to defer detailed read (but maybe a quick read can help with the details).