[SciPy-User] griddata interpolation methods

Gökhan Sever gokhansever@gmail....
Thu Apr 25 15:53:07 CDT 2013


I got the scipy from github, compiled and run the example script, but now
it gives an error:


# stuck at 'linear'
:!python Desktop/griddata_test.py
Traceback (most recent call last):
  File "Desktop/griddata_test.py", line 26, in <module>
    interp1 = griddata(coords, eff_ry.flatten(), (50., 10.),
method='linear')
  File
"/usr/lib64/python2.7/site-packages/scipy/interpolate/ndgriddata.py", line
18
9, in griddata
    return ip(xi)
  File "interpnd.pyx", line 140, in
scipy.interpolate.interpnd.NDInterpolatorBase.__
call__ (scipy/interpolate/interpnd.c:3130)
  File "interpnd.pyx", line 207, in
scipy.interpolate.interpnd.LinearNDInterpolator.
_evaluate_double (scipy/interpolate/interpnd.c:3945)
  File "interpnd.pyx", line 215, in
scipy.interpolate.interpnd.LinearNDInterpolator.
_do_evaluate (scipy/interpolate/interpnd.c:4640)
ValueError: Buffer and memoryview are not contiguous in the same dimension.


and this is for 'cubic'

:!python Desktop/griddata_test.py
Traceback (most recent call last):
  File "Desktop/griddata_test.py", line 28, in <module>
    interp3 = griddata(coords, eff_ry.flatten(), (50., 10.), method='cubic')
  File
"/usr/lib64/python2.7/site-packages/scipy/interpolate/ndgriddata.py", line
19
1, in griddata
    ip = CloughTocher2DInterpolator(points, values, fill_value=fill_value)
  File "interpnd.pyx", line 803, in
scipy.interpolate.interpnd.CloughTocher2DInterpo
lator.__init__ (scipy/interpolate/interpnd.c:8566)
  File "interpnd.pyx", line 478, in
scipy.interpolate.interpnd.estimate_gradients_2d
_global (scipy/interpolate/interpnd.c:6626)
ValueError: Buffer not C contiguous.

Does this require a re-compilation of Cython?



On Thu, Apr 25, 2013 at 10:48 AM, Pauli Virtanen <pav@iki.fi> wrote:

> 25.04.2013 19:13, Gökhan Sever kirjoitti:
> [clip: griddata interpolation method test]
>
> For me that prints
>
> 0.58
> 0.58
> 0.58
>
> Scipy 0.12.0.
>
> Check that Delaunay triangulation for the point set works.
>
> --
> Pauli Virtanen
>
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>



-- 
Gökhan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130425/2c77b5fa/attachment.html 


More information about the SciPy-User mailing list