Skip to content
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

Closed
wants to merge 8 commits into from
Closed

Add numpy.histogram frontend #16669

wants to merge 8 commits into from

Conversation

RohitSgh
Copy link
Contributor

@RohitSgh RohitSgh commented Jun 13, 2023

add_frontend_checklist
closes #16539

@ivy-leaves ivy-leaves added the NumPy Frontend Developing the NumPy Frontend, checklist triggered by commenting add_frontend_checklist label Jun 13, 2023
@RohitSgh RohitSgh changed the title add_frontend_checklist_histogram Add numpy.histogram frontend Jun 14, 2023
Copy link
Contributor

@juliagsy juliagsy left a 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,
Copy link
Contributor

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

@RohitSgh

This comment was marked as outdated.

@RohitSgh
Copy link
Contributor Author

RohitSgh commented Jun 14, 2023

Can you please help me in resolving the issue, @juliagsy?

@RohitSgh
Copy link
Contributor Author

Tried to solve on own and things getting worse 😅
Please help @juliagsy in your free time

@juliagsy
Copy link
Contributor

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!

Copy link
Contributor

@juliagsy juliagsy left a 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]]
Copy link
Contributor

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())
Copy link
Contributor

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

@RohitSgh RohitSgh closed this Jun 16, 2023
@RohitSgh RohitSgh deleted the histogram branch June 16, 2023 19:56
@RohitSgh
Copy link
Contributor Author

Hi @juliagsy. I will work on some different issue. Therefore, Closing PR. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NumPy Frontend Developing the NumPy Frontend, checklist triggered by commenting add_frontend_checklist
Projects
None yet
Development

Successfully merging this pull request may close these issues.

histogram
3 participants