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
Sub-issue of #1648 to track: should create a file like numba_math.py with helper routines acting on tuples.
As mentioned in the original issue, the idea is to put helper functions here, e.g. _numba_norm3(ux, uy, uz) which allows value = _numba_norm3(ux, uy, uz) instead of value = (ux**2 + uy**2 + uz**2)**0.5. These helper functions will be used throughout various regions of the code while addressing #1648.
Although, after looking into it a bit, I have learned that using fixed-length tuples such as u = (ux, uy, uz) is just as efficient as using individual components directly; the inefficiencies come into play if you ever create a list or numpy array. So, I believe helper functions working on tuples would be better, e.g. _numba_norm3(u) to handle value = (u[0]**2 + u[1]**2 + u[2]**2)**0.5.
Activity