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

UnivariateSpline.__call__ should pass all relevant args through to splev #3557

Closed
rhewett opened this issue Apr 17, 2014 · 5 comments · Fixed by #3773
Closed

UnivariateSpline.__call__ should pass all relevant args through to splev #3557

rhewett opened this issue Apr 17, 2014 · 5 comments · Fixed by #3773
Labels
good first issue Good topic for first contributor pull requests, with a relatively straightforward solution scipy.integrate scipy.interpolate
Milestone

Comments

@rhewett
Copy link

rhewett commented Apr 17, 2014

fitpack.splev(...) takes the optional argument ext which dictates how to handle out of range evaluations. UnivariateSpline.__call__() (and subclasses that overload __call__, if any) should pass ext through.

https://github.com/scipy/scipy/blob/master/scipy/interpolate/fitpack2.py#L231

I'd patch this now as it should be an easy one, I just don't have time to fight scipy to install from source atm.

@rhewett rhewett changed the title __call__ on UnivariateSpline should pass through all args to splev __call__ on UnivariateSpline should pass all relevant args through to splev Apr 17, 2014
@rhewett rhewett changed the title __call__ on UnivariateSpline should pass all relevant args through to splev UnivariateSpline.__call__ should pass all relevant args through to splev Apr 17, 2014
@rgommers
Copy link
Member

That would indeed make sense.

@jacobcvt12
Copy link
Contributor

I made this change and here is the diff: https://github.com/Jacobcvt12/scipy/compare/UnivariateSpline

I haven't made any contributions to SciPy before, so if there's anything I need to add/change before making a Pull Request, let me know.

@rhewett
Copy link
Author

rhewett commented Jul 5, 2014

You can always update the PR after submitting it, but you'll need to bring the docstring up to the standard (headings and what not).

@rhewett
Copy link
Author

rhewett commented Jul 5, 2014

But that looks like exactly what is needed!

@rgommers
Copy link
Member

rgommers commented Jul 5, 2014

Hi @jacobcvt12, adding a regression test in scipy/interpolate/tests/test_fitpack2.py would be useful. Then we can be sure that this stays working.

Another minor thing: you may want to edit the commit message (with git commit --amend) to say "closes gh-3557". That format is understood by Github, which then automatically closes this issue once your PR gets merged.

jacobcvt12 added a commit to jacobcvt12/scipy that referenced this issue Jul 6, 2014
Pass parameter to fitpack.splev to control how to handle out of range
evaluations. Added test to scipy/interpolate/tests/test_fitpack2.py.

See ticket 3557.

closes scipygh-3557
jacobcvt12 added a commit to jacobcvt12/scipy that referenced this issue Jul 7, 2014
Pass parameter to fitpack.splev to control how to handle out of range
evaluations. Parameter ext can be passed via __init__ or __call__. Added
test to scipy/interpolate/tests/test_fitpack2.py. Tests if UnivariateSpline
call equals x ** 3 for out of range x and extrapolation modes 0 and 1.

See ticket 3557.

closes scipygh-3557
jacobcvt12 added a commit to jacobcvt12/scipy that referenced this issue Jul 10, 2014
Pass parameter to fitpack.splev to control how to handle out of range
evaluations. Parameter ext can be passed via __init__ or __call__. Added
test to scipy/interpolate/tests/test_fitpack2.py. Tests if UnivariateSpline
call equals x ** 3 for out of range x and extrapolation modes 0 and 1.
Modify _from_tck, derivative, and antiderivative methods to use ext
parameter. __init__ of LSQUnivariateSpline and InterpolatedUnivariateSpline
now accept ext.

See ticket 3557.

closes scipygh-3557
@rgommers rgommers added this to the 0.15.0 milestone Jul 13, 2014
ev-br pushed a commit to ev-br/scipy that referenced this issue Aug 16, 2014
Pass parameter to fitpack.splev to control how to handle out of range
evaluations. Added test to scipy/interpolate/tests/test_fitpack2.py.

See ticket 3557.

closes scipygh-3557
ev-br pushed a commit to ev-br/scipy that referenced this issue Aug 16, 2014
Pass parameter to fitpack.splev to control how to handle out of range
evaluations. Parameter ext can be passed via __init__ or __call__. Added
test to scipy/interpolate/tests/test_fitpack2.py. Tests if UnivariateSpline
call equals x ** 3 for out of range x and extrapolation modes 0 and 1.

See ticket 3557.

closes scipygh-3557
ev-br pushed a commit to ev-br/scipy that referenced this issue Aug 16, 2014
Pass parameter to fitpack.splev to control how to handle out of range
evaluations. Parameter ext can be passed via __init__ or __call__. Added
test to scipy/interpolate/tests/test_fitpack2.py. Tests if UnivariateSpline
call equals x ** 3 for out of range x and extrapolation modes 0 and 1.
Modify _from_tck, derivative, and antiderivative methods to use ext
parameter. __init__ of LSQUnivariateSpline and InterpolatedUnivariateSpline
now accept ext.

See ticket 3557.

closes scipygh-3557
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good topic for first contributor pull requests, with a relatively straightforward solution scipy.integrate scipy.interpolate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants