-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
error from getitem with optional array #7903
Labels
bug - failure to compile
Bugs: failed to compile valid code
Milestone
Comments
Hi @auderson, thanks for the report. I can confirm this is a bug in Numba. import numpy as np
from numba import njit
@njit("float64[:](float64[:], optional(boolean[:]))")
def f1(x, mask=None):
if mask is None:
mask = np.isfinite(x)
return x[mask]
x = np.arange(5)
print(f1(x)) Running with
|
gmarkall
added
needtriage
bug - failure to compile
Bugs: failed to compile valid code
labels
Mar 14, 2022
TODOs:
|
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reporting a bug
visible in the change log (https://github.com/numba/numba/blob/main/CHANGE_LOG).
i.e. it's possible to run as 'python bug.py'.
Hi, I found the following codes will fail:
Looks like
OptionalType
is not correctly handled here.The text was updated successfully, but these errors were encountered: