-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Igamma #15717
Igamma #15717
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.
Hi,
Sorry for the late review. Your PR looks good but can you also add this function for numpy
backend as well. And if its not too difficult, can you also add it to paddle
backend.
Thanks
@sherry30, I couldn't find direct implementations of igamma in numpy and paddle. In the case of numpy, can I use scipy.special.gammainc ? Can you provide some guidance on the paddle as well? Do I need to implement igamma using basic paddle functions? Thanks, |
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.
You cannot use scipy for numpy's implementation. You'll have to implement it through numpy functions. You could get help from scipy's implementation using numpy's functions if it is available on github.
You can leave the paddle backend for now.
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.
Seems like the numpy backend is failing because there are some differences in the answer with the ground truth. If you think this is because of precision error then feel free to add rtol_
or atol_
in the test function. Bu to me it seems like the problem is with the implementation, I haven't dived too deep into it. In case this is a problem with the implementation, you should try to fix it and let me know if you need help with anything.
Thanks
@sherry30 Thanks for pointing this out. There was indeed a minor mistake. Rectified it. The test cases are passing now. Thanks |
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,
Thanks for fixing the numpy implementation.
After thinking it through, we should also add paddle paddle implementation since the tests run for this backend as well 😅. Sorry for not deciding this sooner but can you add that implementation as well. should be similar to numpy.
and feel free to ask anything if you have any questions as always.
Thanks
@sherry30 Sure. I have implemented it for the paddle as well. But couldn't able to test it as there are a few config issues in ivy tests.
Thanks |
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.
Im not sure why you're getting that error, probably some environment error.
It seems to be working fine on my end and all the tests are passing.
Thanks a lot for the contribution and your hard work 😄
Thanks @sherry30 💯 😄 |
Closes #15712