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
fix np_uniform_impl3 for handling size=() #8997
Conversation
Thank you @masaaldosey for your contributions, could you please also add the original example in the issue (#8975 (comment)) as a test? The tests for the numba/numba/tests/test_random.py Lines 520 to 533 in dd082ca
Nice username btw 😄 |
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.
Changes requested as per above comment. (#8997 (comment))
@kc611 haha! thank you! have added the test. please let me know if more changes are needed 😸 |
jit_with_kwargs("np.random.uniform", ['low', 'high', 'size']), | ||
get_np_state_ptr(), | ||
'uniform', | ||
paramlist=[{'low' : 0.0, 'high' : 1.0, 'size': None}]) |
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.
The size needs to check for ()
and not None
.
paramlist=[{'low' : 0.0, 'high' : 1.0, 'size': None}]) | |
paramlist=[{'low' : 0.0, 'high' : 1.0, 'size': ()}]) |
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.
Hi @kc611! I applied the suggestion and ran the test locally. The test fails because of dtype
mismatch (see attached screenshot). I think I need to fiddle around with this method. But I am not sure. Could you help me with this?
This pull request is marked as stale as it has had no activity in the past 3 months. Please respond to this comment if you're still interested in working on this. Many thanks! |
Closes #8975.
Simply added this suggestion by @kc611.