Skip to content

Add convex analysis ufuncs to cupyx.scipy.special - #2861

Merged
niboshi merged 5 commits into
cupy:masterfrom
grlee77:entropy
Feb 10, 2020
Merged

niboshi merged 5 commits into
cupy:masterfrom
grlee77:entropy

Conversation

@grlee77

@grlee77 grlee77 commented Dec 23, 2019

Copy link
Copy Markdown
Member

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

@niboshi niboshi left a comment

Copy link
Copy Markdown
Contributor

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.

Comment thread cupyx/scipy/special/convex_analysis.py Resolved
Comment thread cupyx/scipy/special/convex_analysis.py Resolved
Comment thread cupyx/scipy/special/convex_analysis.py Resolved
Comment thread cupyx/scipy/special/convex_analysis.py Resolved
Comment thread cupyx/scipy/special/convex_analysis.py Resolved
Comment thread cupyx/scipy/special/convex_analysis.py Resolved
@grlee77

grlee77 commented Dec 27, 2019

Copy link
Copy Markdown
Member Author

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

grlee77 commented Feb 5, 2020

Copy link
Copy Markdown
Member Author

ping. this should be ready for testing

@niboshi

niboshi commented Feb 7, 2020

Copy link
Copy Markdown
Contributor

Sorry for delay.
Jenkins, test this please

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 45bc4e8:

@chainer-ci

Copy link
Copy Markdown
Member

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

@grlee77

grlee77 commented Feb 7, 2020

Copy link
Copy Markdown
Member Author

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

@niboshi

niboshi commented Feb 10, 2020

Copy link
Copy Markdown
Contributor

Thanks. Jenkins, test this please

@pfn-ci-bot

Copy link
Copy Markdown
Collaborator

Successfully created a job for commit 4bc7ee1:

@chainer-ci

Copy link
Copy Markdown
Member

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

@niboshi

niboshi commented Feb 10, 2020

Copy link
Copy Markdown
Contributor

👍

@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.

4 participants