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

Adding jax.numpy.histogram #21958

Closed
wants to merge 2 commits into from
Closed

Adding jax.numpy.histogram #21958

wants to merge 2 commits into from

Conversation

marwanWaly
Copy link

Close #19652

the requested changes as #21188 are done

@github-actions
Copy link
Contributor

Thanks for contributing to Ivy! 😊👏
Here are some of the important points from our Contributing Guidelines 📝:
1. Feel free to ignore the run_tests (1), run_tests (2), … jobs, and only look at the display_test_results job. 👀 It contains the following two sections:
- Combined Test Results: This shows the results of all the ivy tests that ran on the PR. ✔️
- New Failures Introduced: This lists the tests that are passing on main, but fail on the PR Fork. Please try to make sure that there are no such tests. 💪
2. The lint / Check formatting / check-formatting tests check for the formatting of your code. 📜 If it fails, please check the exact error message in the logs and fix the same. ⚠️🔧
3. Finally, the test-docstrings / run-docstring-tests check for the changes made in docstrings of the functions. This may be skipped, as well. 📚
Happy coding! 🎉👨‍💻

@ivy-leaves ivy-leaves added the JAX Frontend Developing the JAX Frontend, checklist triggered by commenting add_frontend_checklist label Aug 15, 2023
Copy link
Contributor

@zaeemansari70 zaeemansari70 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your function seems to be failing for the following, I have provided the falsifying example below:

E       AssertionError: The length of results from backend numpy and ground truth framework jax does not match
E       
E       len(ret_np_flat) != len(ret_np_from_gt_flat):
E       
E       ret_np_flat:
E       
E       [array([0.], dtype=float32)]
E       
E       ret_np_from_gt_flat:
E       
E       [array([0.], dtype=float32), array([0., 1.], dtype=float32)]
E       Falsifying example: test_jax_histogram(
E           on_device='cpu',
E           frontend='jax',
E           backend_fw='numpy',
E           values=(array([-1., -1.], dtype=float32),
E            array([0., 1.], dtype=float32),
E            0,
E            True,
E            False,
E            'float32',
E            None,
E            array([-1., -1.], dtype=float32),
E            False,
E            'float32'),
E           test_flags=FrontendFunctionTestFlags(
E               num_positional_args=0,
E               with_out=False,
E               inplace=False,
E               as_variable=[False],
E               native_arrays=[False],
E               generate_frontend_arrays=False,
E           ),
E           fn_tree='ivy.functional.frontends.jax.numpy.histogram',
E       )
E       
E       You can reproduce this example by temporarily adding @reproduce_failure('6.82.4', b'AXicY2BgZMAOGKESMHlGItkwAAACQQAM') as a decorator on your test case

Kinldy look into this, thanks! 🙂

range=None,
weights=None,
density=False,
) -> ivy.Array:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't need to add a typehint here.

@zaeemansari70
Copy link
Contributor

Closing due to inactivity

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

Successfully merging this pull request may close these issues.

histogram
3 participants