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

MAINT: interpolate: use operator.index for checking/coercing to integers #9444

Merged
merged 1 commit into from
Nov 6, 2018

Conversation

ev-br
Copy link
Member

@ev-br ev-br commented Nov 5, 2018

Use the recommended idiom for checking integer inputs.
Strictly speaking, this is a backcompat break since some ValueErrors become TypeErrors, but I believe this is harmless (can't see any reason to catch these errors in library or user code).

@ev-br ev-br added scipy.interpolate maintenance Items related to regular maintenance tasks labels Nov 5, 2018
@ilayn
Copy link
Member

ilayn commented Nov 6, 2018

Should we wait the 1.2 branch for this or go ahead and put this in? Since it is a private function I also don't expect any problems

@tylerjereddy

Copy link
Contributor

@tylerjereddy tylerjereddy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merging based on comments from two core devs above, a quick review of the changes, the best practices note on stack overflow on this matter, and CI is all green.

@tylerjereddy tylerjereddy merged commit 724497e into scipy:master Nov 6, 2018
@ilayn ilayn added this to the 1.2.0 milestone Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants