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 convex analysis ufuncs to cupyx.scipy.special #2861

Merged
merged 5 commits into from
Feb 10, 2020
Merged

Conversation

grlee77
Copy link
Contributor

@grlee77 grlee77 commented Dec 23, 2019

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 and rel_entr are used to implement scipy.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.

@niboshi niboshi changed the title add convex analysis ufuncs to cupyx.scipy.special Add convex analysis ufuncs to cupyx.scipy.special Dec 24, 2019
Copy link
Member

@niboshi niboshi left a 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.

cupyx/scipy/special/convex_analysis.py Outdated Show resolved Hide resolved
cupyx/scipy/special/convex_analysis.py Outdated Show resolved Hide resolved
cupyx/scipy/special/convex_analysis.py Outdated Show resolved Hide resolved
cupyx/scipy/special/convex_analysis.py Outdated Show resolved Hide resolved
cupyx/scipy/special/convex_analysis.py Outdated Show resolved Hide resolved
cupyx/scipy/special/convex_analysis.py Outdated Show resolved Hide resolved
@grlee77
Copy link
Contributor Author

grlee77 commented Dec 27, 2019

Thanks for the nice review and sorry about all the minor formatting issues in the C++ source! I have addressed them now.

@toslunar toslunar requested a review from niboshi January 17, 2020 04:40
@niboshi niboshi added this to the v8.0.0a1 milestone Jan 22, 2020
@grlee77
Copy link
Contributor Author

grlee77 commented Feb 5, 2020

ping. this should be ready for testing

@niboshi
Copy link
Member

niboshi commented Feb 7, 2020

Sorry for delay.
Jenkins, test this please

@pfn-ci-bot
Copy link
Collaborator

Successfully created a job for commit 45bc4e8:

@chainer-ci
Copy link
Member

Jenkins CI test (for commit 45bc4e8, target branch master) failed with status FAILURE.

@grlee77
Copy link
Contributor Author

grlee77 commented Feb 7, 2020

I have moved the import that was causing 1 CI failure. please try again

@niboshi
Copy link
Member

niboshi commented Feb 10, 2020

Thanks. Jenkins, test this please

@pfn-ci-bot
Copy link
Collaborator

Successfully created a job for commit 4bc7ee1:

@chainer-ci
Copy link
Member

Jenkins CI test (for commit 4bc7ee1, target branch master) succeeded!

@niboshi
Copy link
Member

niboshi commented Feb 10, 2020

👍

@niboshi niboshi merged commit b525216 into cupy:master Feb 10, 2020
@niboshi niboshi added the cat:feature New features/APIs label Feb 10, 2020
@grlee77 grlee77 deleted the entropy branch September 9, 2020 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:feature New features/APIs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants