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

Added ediff1d to numpy frontend #13368

Merged
merged 26 commits into from
Apr 3, 2023
Merged

Added ediff1d to numpy frontend #13368

merged 26 commits into from
Apr 3, 2023

Conversation

Aneesh02
Copy link
Contributor

Close #13356

@ivy-leaves ivy-leaves added the NumPy Frontend Developing the NumPy Frontend, checklist triggered by commenting add_frontend_checklist label Mar 29, 2023
@Aneesh02
Copy link
Contributor Author

@Infrared1029 Request you to look at my PR

@Infrared1029
Copy link
Contributor

Hello @Aneesh02, the test appears to be failing, can you make sure it passes so I can take a close look? Thanks!

@Aneesh02
Copy link
Contributor Author

Hello @Infrared1029, Thanks for reviewing I have fixed the error in test_run_1. The linting error is not from the files I have changed.

@Infrared1029
Copy link
Contributor

Hello @Aneesh02, the implementation looks good to me, just a few comments, make sure to follow the original function signature i.e numpy.ediff1d(ary, to_end=None, to_begin=None) instead of numpy.ediff1d(x, to_end=None, to_begin=None), the test appears to generate values for x only, this is sub-optimal, the test has to generate values for all possible inputs the function takes, i.e you should generate values for to_begin and to_end as well, the tests fails with paddle backend, it has to do with the dtypes (paddle.diff does not support uint8), you might need to add a with_unsupported_dtypes decorator to the backend diff implementation for paddlepaddle. Thanks!

@Aneesh02
Copy link
Contributor Author

@Infrared1029 Thanks for the review. I have incorporated the original function signature. Can you please help me as to where can I find paddle.diff in the backend files?

@Aneesh02
Copy link
Contributor Author

Aneesh02 commented Apr 2, 2023

@Infrared1029 please help me resolve this error

Screenshot from 2023-04-02 12-20-03

@Aneesh02
Copy link
Contributor Author

Aneesh02 commented Apr 2, 2023

UPDATE: All the tests are passing for now. Just the test file needs to fixed to incorporate values for to_begin and to_end.

@Infrared1029
Copy link
Contributor

Infrared1029 commented Apr 2, 2023

UPDATE: All the tests are passing for now. Just the test file needs to fixed to incorporate values for to_begin and to_end.

let me know once you get that done:)

@Aneesh02
Copy link
Contributor Author

Aneesh02 commented Apr 2, 2023

@Infrared1029 I have fixed the issues. Please have a look. Thanks!

@Aneesh02
Copy link
Contributor Author

Aneesh02 commented Apr 3, 2023

@AnnaTz @Infrared1029 I have tried a lot I cannot find out why the error is coming. Please help me resolve it. The example generated is fine.

@Aneesh02 Aneesh02 requested a review from AnnaTz April 3, 2023 14:31
@AnnaTz
Copy link
Contributor

AnnaTz commented Apr 3, 2023

@AnnaTz @Infrared1029 I have tried a lot I cannot find out why the error is coming. Please help me resolve it. The example generated is fine.

Just found ediff1 in our jax numpy frontend. You could take a look at how that was implemented and tested. It's practically the same function.

@Aneesh02
Copy link
Contributor Author

Aneesh02 commented Apr 3, 2023

@AnnaTz Finally it worked. Looks like the way I wrote the function was wrong. It was a good learning experience for me. Thank you @AnnaTz @Infrared1029 for reviewing the PR multiple times.

@AnnaTz AnnaTz merged commit da580ec into ivy-llc:master Apr 3, 2023
@Aneesh02
Copy link
Contributor Author

Aneesh02 commented Apr 3, 2023

Thanks @AnnaTz @Infrared1029

MuhammedAshraf2020 pushed a commit to MuhammedAshraf2020/ivy that referenced this pull request Apr 9, 2023
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.

ediff1d
4 participants