-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Add numpy.histogram frontend #16669
Add numpy.histogram frontend #16669
Conversation
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.
Hey there! Thanks for the great work so far! I've left a small comment below, feel free to ping me if there's any issue or question! Thanks!
weights=None, | ||
density=None, | ||
*, | ||
out=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.
not sure if I overlooked anything, but I don't think the numpy histogram has out and dtype argument?
ref: https://numpy.org/doc/stable/reference/generated/numpy.histogram.html
This comment was marked as outdated.
This comment was marked as outdated.
Can you please help me in resolving the issue, @juliagsy? |
Tried to solve on own and things getting worse 😅 |
Hey @RohitSgh ! So sorry, seems like there might be some issue with the ci earlier, would you mind pushing a commit of some dummy changes so that the ci reruns automatically? Apologies for any inconvenience and thanks a lot! |
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.
Hey! Thanks for contributing! I've left some comments below, please also make sure that all tests are passing after that! Thanks!
density=None, | ||
weights=None, | ||
): | ||
[x.dtype for x in [a, weights]] |
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.
as the ivy histogram function are able to handle the default values from numpy, could you please try to reduce additional codes here?
unless there are necessary for the tests to pass, please try to minimise additional code!
if weights is None: | ||
weights = ivy.ones_like(a) | ||
if range is None: | ||
range = (a.min(), a.max()) |
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.
one necessary condition might be if density
is None
, we set it to False
Hi @juliagsy. I will work on some different issue. Therefore, Closing PR. Thanks! |
add_frontend_checklist
closes #16539