The biggest problem in the design of this code is the lack of numba support (at the moment) for user-defined types or closures. In particular, I'd like WignerD to be either
An object that can store information like
complex Ra, Rb;
double absRa, absRb, absRRatioSquared;
int intlog10absRa, intlog10absRb;
A function that can return functions that use values calculated in the original function (this is called a closure). The effect would be the same as above, where those values would be calculated once, but then the function would just use them. This feels slightly preferable to the above, except that I think it would actually be slower, because presumably the inner function would have to be re-jitted each time, which isn't fast.
The biggest problem in the design of this code is the lack of numba support (at the moment) for user-defined types or closures. In particular, I'd like
WignerD
to be eitherAn object that can store information like