[Scipy-tickets] [SciPy] #1364: interp2d is weirdb
SciPy Trac
scipy-tickets@scipy....
Sun Jan 16 15:08:40 CST 2011
#1364: interp2d is weirdb
-------------------------------+--------------------------------------------
Reporter: bubla | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone: 0.9.0
Component: scipy.interpolate | Version: 0.8.0
Keywords: |
-------------------------------+--------------------------------------------
The interp2d function either crashes or gives strange results.
Consider the following code:
{{{
import scipy as sp
import scipy.interpolate
rand = sp.rand(2,3)
#array([[ 0.84793638, 0.8332837 , 0.31432397],
# [ 0.30853293, 0.6814913 , 0.73636099]])
x = sp.arange(2)
y = sp.arange(3)
rand_i = sp.interpolate.interp2d(x,y,rand)
rand_i(0, 0)
# returns array([ 0.84793638])
rand_i(1, 1)
# returns array([ 0.30853293]) - that's weird, isn't it?
}}}
Moreover, if you try to interpolate a larger array:
- 50 x 50 array is OK
- 20 x 50 fails with a strange error (something about B-spline
coefficients, which is strange since linear interpolation is supposed to
be used)
- 30 x 50 crashes ipython without any messages
Could you take a look at this?
--
Ticket URL: <http://projects.scipy.org/scipy/ticket/1364>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.
More information about the Scipy-tickets
mailing list