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

BUG: Akima1DInterpolator may return nans given multidimensional input #5683

Closed
nmayorov opened this issue Jan 7, 2016 · 1 comment
Closed
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.interpolate
Milestone

Comments

@nmayorov
Copy link
Contributor

nmayorov commented Jan 7, 2016

Here is an example:

import numpy as np
from scipy.interpolate import Akima1DInterpolator
x = np.array([0, 1, 2])
y = np.vstack((x, x**2)).T
ak = Akima1DInterpolator(x, y)
print(ak.c)

array([[[ nan,   0.],
        [ nan,   0.]],

       [[ nan,   1.],
        [ nan,   1.]],

       [[ nan,   0.],
        [ nan,   2.]],

       [[  0.,   0.],
        [  1.,   1.]]])

The algorithm needs to consider some cases separately (as with linear ramp in the example above), but the broadcasting for these cases is implemented somewhat incorrectly.

nmayorov pushed a commit to nmayorov/scipy that referenced this issue Jan 7, 2016
nmayorov pushed a commit to nmayorov/scipy that referenced this issue Jan 7, 2016
@ev-br ev-br added defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.interpolate labels Jan 7, 2016
@ev-br
Copy link
Member

ev-br commented Jan 17, 2016

fixed in gh-5684.

BTW @nmayorov this github feature is sometimes handy, https://help.github.com/articles/closing-issues-via-commit-messages/

@ev-br ev-br closed this as completed Jan 17, 2016
@ev-br ev-br added this to the 0.18.0 milestone Jan 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect A clear bug or issue that prevents SciPy from being installed or used as expected scipy.interpolate
Projects
None yet
Development

No branches or pull requests

2 participants