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
Support attribute access from other modules #6334
Conversation
@farahhariri thanks for submitting this! Perhaps you could provide a little more context as to why this is needed or what it fixes? Thanks! |
Hi @esc This is needed for when someone accesses an attribute (like a constant tuple) in another module. I will add a test case to it to show what it addresses |
@farahhariri excellent, test cases are always welcome. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution.
@farahhariri Congratulations on your first contribution to Numba! |
Thanks @stuartarchibald :) |
Accessing an attribute from another module currently fails if it has a complex data type like string. This PR passes the builder object to the
get_getattr
function and usesget_constant_generic
instead ofget_constant
to retrieve attributes. A test case that shows an example that would usually fail and this PR fixes is added