Repository navigation
less_simple_linear_interpolation can be replaced by np.interp. - #9865
Merged
Merged
Conversation
Member
|
Tiny image error on the mac: I don't have time right now, but could try to see what the difference is later tonight. |
Contributor
Author
|
that'd be very helpful, thanks |
Member
|
The image error is: If I look at the diff image, I can't see where the difference is, and the images look fine. I'd suggest raising the tolerance for this one. |
Member
anntzer
force-pushed
the
linear-interp-2
branch
from
November 28, 2017 02:42
d1f565f to
db1bbd6
Compare
Contributor
Author
|
We're probably running into some 32-vs-64 bit rounding error that's a bit bigger for interp; that test actually already had a nonzero tolerance so I feel comfortable increasing it a bit. |
jklymak
approved these changes
Nov 29, 2017
tacaswell
requested changes
Dec 1, 2017
|
|
||
| return lw | ||
|
|
||
| @cbook.deprecated("2.2") |
Member
There was a problem hiding this comment.
This seems unrelated. Can you remove it or add an API changes doc?
| ################################################## | ||
| # Linear interpolation algorithms | ||
| ################################################## | ||
| @cbook.deprecated("2.2", alternative="np.interp") |
Also, in contour (the only place that used it), -1 (instead of nan) is a perfectly reasonable marker for out of bounds which avoids having to dance with the errstate.
anntzer
force-pushed
the
linear-interp-2
branch
from
December 1, 2017 19:23
db1bbd6 to
adb2f8a
Compare
tacaswell
approved these changes
Dec 1, 2017
Member
|
Thanks @anntzer |
6 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Also, in contour (the only place that used it), -1 (instead of nan) is
a perfectly reasonable marker for out of bounds which avoids having to
dance with the errstate.
Replaces #9859: @efiring pointed out and I confirmed that we neither implement nor need linear extrapolation, so np.interp is perfectly sufficient.
Made a separate PR as the approach is somewhat different.
PR Summary
PR Checklist