Roy Smart
Roy Smart
I think this would be great as well. I know the documentation is rough, and maybe it's not quite appropriate for your use case, but I've done a ton of...
+1 on this feature, this would be really helpful for me. Is there anything I can do to help get it over the line?
@mhvk, thanks for the helpful example. To start, I've adapted your code to use `@numba.vectorize`, and I was able to confirm it does return an array with the correct dtype....
In my particular use case I'm trying to accelerate a subset of my raytracing library, [`optika`](https://optika.readthedocs.io/en/latest/). Defining a bunch of helpers and using `register_module` wouldn't be too bad, but in...
I like the idea of using type annotations to determine the units, similar to the behavior of `@quantity_input`. Here is my attempt at implementing that idea, which also includes an...
I really didn't want to add the new `numba` dependency, but I haven't yet been able to find something which has the same behavior as `numba.vectorize`. I'll keep thinking about...
@mhvk, do you understand why `@numba.vectorize` works, but [`@numpy.vectorize`](https://numpy.org/doc/stable/reference/generated/numpy.vectorize.html#numpy.vectorize) does not? For example, if I do ``` @u.quantity_ufunc_overload @np.vectorize def add2(x: u.Quantity[u.mm], y: u.Quantity[u.mm]) -> u.Quantity[u.mm]: return x + y...
@neutrinoceros and @mhvk, if you changed ``` assert all_q_ufuncs - all_np_ufuncs - all_erfa_ufuncs == set() ``` to ``` assert (all_np_ufuncs | all_erfa_ufuncs).issubset(all_q_ufuncs) ``` wouldn't that preserve the spirit of the...
No worries, enjoy your weekend!
I realized that registering new ufuncs was probably unnecessary. The same behavior can be accomplished by writing a decorator which strips the units off of the arguments and then attaches...