-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Numba warnings #110
Comments
Also this one shows up when using eval_splines:
|
And further, |
@albop taking a closer look at the code in I am reading https://numba.readthedocs.io/en/stable/reference/deprecation.html#deprecation-of-generated-jit otherwise we can move some of this over to use |
I used to like this function... |
@albop @kp992 I have been reading the deprecation notice this morning. I think this is what is needed for all the generated_jit calls but it seems like a lot of boiler plate.
rather than the simpler |
If def get_index(gc, x): # This is called from pure Python
pass
@overload(get_index) # This is called from inside a jitted function
def ol_get_index(gc, x):
if gc == t_coord:
# regular coordinate
def fun(gc, x):
δ = (gc[1] - gc[0]) / (gc[2] - 1)
d = x - gc[0]
ii = d // δ
i = int(ii)
i = clamp(i, 0, gc[2] - 2)
r = d - i * δ
λ = r / δ
return (i, λ)
return fun
else:
# irregular coordinate
def fun(gc, x):
N = gc.shape[0]
i = int(np.searchsorted(gc, x)) - 1
i = clamp(i, 0, N - 2)
λ = (x - gc[i]) / (gc[i + 1] - gc[i])
return (i, λ)
return fun |
thanks @oyamad for that link. That is really helpful. |
Thanks @mmcky and @oyamad. I have tried both the approaches, but the tests are failing. I tried to fix |
The text was updated successfully, but these errors were encountered: