-
-
Notifications
You must be signed in to change notification settings - Fork 787
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 convex analysis ufuncs to cupyx.scipy.special
#2861
Conversation
cupyx.scipy.special
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.
Thank you for the PR. Please check it.
tests/cupyx_tests/scipy_tests/special_tests/test_convex_analysis.py
Outdated
Show resolved
Hide resolved
tests/cupyx_tests/scipy_tests/special_tests/test_convex_analysis.py
Outdated
Show resolved
Hide resolved
tests/cupyx_tests/scipy_tests/special_tests/test_convex_analysis.py
Outdated
Show resolved
Hide resolved
tests/cupyx_tests/scipy_tests/special_tests/test_convex_analysis.py
Outdated
Show resolved
Hide resolved
Thanks for the nice review and sorry about all the minor formatting issues in the C++ source! I have addressed them now. |
ping. this should be ready for testing |
Sorry for delay. |
Successfully created a job for commit 45bc4e8: |
Jenkins CI test (for commit 45bc4e8, target branch master) failed with status FAILURE. |
I have moved the import that was causing 1 CI failure. please try again |
Thanks. Jenkins, test this please |
Successfully created a job for commit 4bc7ee1: |
Jenkins CI test (for commit 4bc7ee1, target branch master) succeeded! |
👍 |
This PR adds five simple ufuncs to
cupyx.scipy.special
. In SciPy, these are defined in _convex_analysis.pxd. I followed some existing examples in the cupyx.scipy.special folder on how to handle NaN's and added an equivalent handling for INF values here.entr
andrel_entr
are used to implementscipy.stats.entropy
if there is interest in adding that in a follow-up PR.Most of the test cases added here correspond to ones defined in the SciPy test suite.