Problem with N-dimensional interpolation using a new griddata function for N>=3
Hello , I have downloaded from SVN the latest `griddata` implementation for working in N-D with irregular grids (scipy v0.9.0dev6812). It works great for 2D problems. However for 3D (and more) I have a problem: the NaN values appears always in the same position, and it does not depend on the scalar field being interpolated. Here is a small example of simple 3x3x3 regular grid and a constant scalar field of 1.0 values, that is interpolated at the input data points. Example: ****************************** from numpy import * from scipy.interpolate import * grid_x, grid_y, grid_z = mgrid[0:1:3j, 0:1:3j, 0:1:3j] pts = [[ 0.0 , 0.0 , 0.0 ], [ 0.0 , 0.0 , 0.5 ], [ 0.0 , 0.0 , 1.0 ], [ 0.0 , 0.5 , 0.0 ], [ 0.0 , 0.5 , 0.5 ], [ 0.0 , 0.5 , 1.0 ], [ 0.0 , 1.0 , 0.0 ], [ 0.0 , 1.0 , 0.5 ], [ 0.0 , 1.0 , 1.0 ], [ 0.5 , 0.0 , 0.0 ], [ 0.5 , 0.0 , 0.5 ], [ 0.5 , 0.0 , 1.0 ], [ 0.5 , 0.5 , 0.0 ], [ 0.5 , 0.5 , 0.5 ], [ 0.5 , 0.5 , 1.0 ], [ 0.5 , 1.0 , 0.0 ], [ 0.5 , 1.0 , 0.5 ], [ 0.5 , 1.0 , 1.0 ], [ 1.0 , 0.0 , 0.0 ], [ 1.0 , 0.0 , 0.5 ], [ 1.0 , 0.0 , 1.0 ], [ 1.0 , 0.5 , 0.0 ], [ 1.0 , 0.5 , 0.5 ], [ 1.0 , 0.5 , 1.0 ], [ 1.0 , 1.0 , 0.0 ], [ 1.0 , 1.0 , 0.5 ], [ 1.0 , 1.0 , 1.0 ]] vls = ones(27) points = array(pts).astype('float64') values = array(vls).astype('float64') grid_z1 = griddata(points, values, (grid_x, grid_y, grid_z), method='linear', fill_value=0) print 'grid_z1=', grid_z1 *********************** I obtain the following result: grid_z1= [[[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] [[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] [[ 1. 1. 1.] [ 1. 1. nan] [ 1. 1. 1.]]] Thanks, Adam
Tue, 21 Sep 2010 13:54:45 +0200, Adam Machnik wrote:
I have downloaded from SVN the latest `griddata` implementation for working in N-D with irregular grids (scipy v0.9.0dev6812). It works great for 2D problems. However for 3D (and more) I have a problem: the NaN values appears always in the same position, and it does not depend on the scalar field being interpolated. Here is a small example of simple 3x3x3 regular grid and a constant scalar field of 1.0 values, that is interpolated at the input data points.
Works for me. grid_z1= [[[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] [[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] [[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]]] Do you get the same triangulation?
from scipy.spatial import Delaunay Delaunay(points).vertices array([[ 1, 12, 10, 13], [ 1, 9, 12, 10], [ 1, 4, 10, 13], [ 1, 4, 12, 13], [ 1, 3, 4, 12], [ 1, 9, 10, 0], [ 1, 9, 12, 0], [ 1, 3, 12, 0], [ 1, 3, 4, 0], [21, 12, 10, 13], [21, 22, 12, 13], [21, 9, 12, 10], [21, 22, 10, 13], [21, 19, 22, 10], [21, 9, 10, 18], [21, 9, 12, 18], [21, 19, 10, 18], [21, 19, 22, 18], [15, 4, 12, 13], [15, 16, 12, 13], [15, 3, 4, 6], [15, 16, 4, 13], [15, 7, 16, 4], [15, 3, 4, 12], [15, 7, 4, 6], [15, 7, 16, 6], [25, 22, 12, 13], [25, 16, 12, 13], [25, 21, 22, 24], [25, 16, 22, 13], [25, 15, 16, 24], [25, 21, 12, 24], [25, 21, 22, 12], [25, 15, 12, 24], [25, 15, 16, 12], [23, 16, 22, 13], [23, 25, 16, 26], [23, 14, 16, 13], [23, 17, 14, 16], [23, 25, 16, 22], [23, 17, 16, 26], [23, 17, 14, 26], [23, 22, 10, 13], [23, 14, 10, 13], [23, 11, 14, 20], [23, 19, 10, 20], [23, 19, 22, 10], [23, 11, 10, 20], [23, 11, 14, 10], [ 5, 16, 4, 13], [ 5, 14, 16, 13], [ 5, 7, 16, 8], [ 5, 7, 16, 4], [ 5, 17, 16, 8], [ 5, 17, 14, 16], [ 5, 4, 10, 13], [ 5, 11, 14, 10], [ 5, 14, 10, 13], [ 5, 1, 10, 2], [ 5, 1, 4, 10], [ 5, 11, 10, 2]])
The triangulation seems not exactly the same: [[23 16 22 13] [23 25 16 22] [23 14 22 13] [23 14 16 13] [23 17 14 16] [23 25 22 26] [23 25 16 26] [23 17 16 26] [23 17 14 26] [19 14 22 13] [19 10 22 13] [19 23 14 20] [19 10 14 13] [19 11 10 14] [19 23 22 20] [19 23 14 22] [19 11 14 20] [19 11 10 20] [21 10 22 13] [21 19 10 18] [21 12 10 13] [21 9 12 10] [21 19 10 22] [21 9 10 18] [21 9 12 18] [21 16 22 13] [21 15 12 16] [21 12 16 13] [21 25 16 22] [21 25 16 24] [21 15 16 24] [21 15 12 24] [ 1 12 10 13] [ 1 4 10 13] [ 1 9 12 0] [ 1 4 12 13] [ 1 3 4 12] [ 1 9 12 10] [ 1 3 12 0] [ 1 3 4 0] [ 5 10 14 13] [ 5 4 10 13] [ 5 11 10 2] [ 5 4 14 13] [ 5 1 4 2] [ 5 11 10 14] [ 5 1 10 2] [ 5 1 4 10] [ 7 12 16 13] [ 7 4 12 13] [ 7 15 12 6] [ 7 15 12 16] [ 7 3 12 6] [ 7 3 4 12] [ 7 14 16 13] [ 7 4 14 13] [ 7 17 14 8] [ 7 17 14 16] [ 7 5 14 8] [ 7 5 4 14]] On Tue, Sep 21, 2010 at 2:03 PM, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 21 Sep 2010 13:54:45 +0200, Adam Machnik wrote:
I have downloaded from SVN the latest `griddata` implementation for working in N-D with irregular grids (scipy v0.9.0dev6812). It works great for 2D problems. However for 3D (and more) I have a problem: the NaN values appears always in the same position, and it does not depend on the scalar field being interpolated. Here is a small example of simple 3x3x3 regular grid and a constant scalar field of 1.0 values, that is interpolated at the input data points.
Works for me.
grid_z1= [[[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] [[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] [[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]]]
Do you get the same triangulation?
from scipy.spatial import Delaunay Delaunay(points).vertices array([[ 1, 12, 10, 13], [ 1, 9, 12, 10], [ 1, 4, 10, 13], [ 1, 4, 12, 13], [ 1, 3, 4, 12], [ 1, 9, 10, 0], [ 1, 9, 12, 0], [ 1, 3, 12, 0], [ 1, 3, 4, 0], [21, 12, 10, 13], [21, 22, 12, 13], [21, 9, 12, 10], [21, 22, 10, 13], [21, 19, 22, 10], [21, 9, 10, 18], [21, 9, 12, 18], [21, 19, 10, 18], [21, 19, 22, 18], [15, 4, 12, 13], [15, 16, 12, 13], [15, 3, 4, 6], [15, 16, 4, 13], [15, 7, 16, 4], [15, 3, 4, 12], [15, 7, 4, 6], [15, 7, 16, 6], [25, 22, 12, 13], [25, 16, 12, 13], [25, 21, 22, 24], [25, 16, 22, 13], [25, 15, 16, 24], [25, 21, 12, 24], [25, 21, 22, 12], [25, 15, 12, 24], [25, 15, 16, 12], [23, 16, 22, 13], [23, 25, 16, 26], [23, 14, 16, 13], [23, 17, 14, 16], [23, 25, 16, 22], [23, 17, 16, 26], [23, 17, 14, 26], [23, 22, 10, 13], [23, 14, 10, 13], [23, 11, 14, 20], [23, 19, 10, 20], [23, 19, 22, 10], [23, 11, 10, 20], [23, 11, 14, 10], [ 5, 16, 4, 13], [ 5, 14, 16, 13], [ 5, 7, 16, 8], [ 5, 7, 16, 4], [ 5, 17, 16, 8], [ 5, 17, 14, 16], [ 5, 4, 10, 13], [ 5, 11, 14, 10], [ 5, 14, 10, 13], [ 5, 1, 10, 2], [ 5, 1, 4, 10], [ 5, 11, 10, 2]])
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
Hello, I am concerned in the difference in triangulation. I think that on such a simple grid there should be no difference from qhull results. FYI: I have tested the scipy.spatial module on my workstation. There is one test that fails. However it was already reported in the mailinglist, and it does not seem to be the problem. What can I do else ? Adam
import scipy scipy.spatial.test() Running unit tests for scipy.spatial NumPy version 1.5.0 NumPy is installed in /UTIL/PYTHON26/lib/python2.6/site-packages/numpy SciPy version 0.9.0.dev6812 SciPy is installed in /UTIL/PYTHON26/lib/python2.6/site-packages/scipy Python version 2.6.4 (r264:75706, Nov 9 2009, 15:41:41) [GCC 3.4.6 20060404 (Red Hat 3.4.6-9)] nose version 0.11.1 ............................................................................................................................F.................................................................................................................................................. ====================================================================== FAIL: Tests pdist(X, 'minkowski') on iris data. (float32)
Traceback (most recent call last): File "/UTIL/PYTHON26/lib/python2.6/site-packages/scipy/spatial/tests/test_distance.py", line 838, in test_pdist_minkowski_3_2_iris_float32 self.assertTrue(within_tol(Y_test1, Y_right, eps)) AssertionError: """Fail the test unless the expression is true."""
if not False: raise self.failureException, None
---------------------------------------------------------------------- Ran 271 tests in 15.020s FAILED (failures=1) <nose.result.TextTestResult run=271 errors=0 failures=1>
On Tue, Sep 21, 2010 at 2:21 PM, Adam Machnik <amachnik@gmail.com> wrote:
The triangulation seems not exactly the same:
[[23 16 22 13] [23 25 16 22] [23 14 22 13] [23 14 16 13] [23 17 14 16] [23 25 22 26] [23 25 16 26] [23 17 16 26] [23 17 14 26] [19 14 22 13] [19 10 22 13] [19 23 14 20] [19 10 14 13] [19 11 10 14] [19 23 22 20] [19 23 14 22] [19 11 14 20] [19 11 10 20] [21 10 22 13] [21 19 10 18] [21 12 10 13] [21 9 12 10] [21 19 10 22] [21 9 10 18] [21 9 12 18] [21 16 22 13] [21 15 12 16] [21 12 16 13] [21 25 16 22] [21 25 16 24] [21 15 16 24] [21 15 12 24] [ 1 12 10 13] [ 1 4 10 13] [ 1 9 12 0] [ 1 4 12 13] [ 1 3 4 12] [ 1 9 12 10] [ 1 3 12 0] [ 1 3 4 0] [ 5 10 14 13] [ 5 4 10 13] [ 5 11 10 2] [ 5 4 14 13] [ 5 1 4 2] [ 5 11 10 14] [ 5 1 10 2] [ 5 1 4 10] [ 7 12 16 13] [ 7 4 12 13] [ 7 15 12 6] [ 7 15 12 16] [ 7 3 12 6] [ 7 3 4 12] [ 7 14 16 13] [ 7 4 14 13] [ 7 17 14 8] [ 7 17 14 16] [ 7 5 14 8] [ 7 5 4 14]]
On Tue, Sep 21, 2010 at 2:03 PM, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 21 Sep 2010 13:54:45 +0200, Adam Machnik wrote:
I have downloaded from SVN the latest `griddata` implementation for working in N-D with irregular grids (scipy v0.9.0dev6812). It works great for 2D problems. However for 3D (and more) I have a problem: the NaN values appears always in the same position, and it does not depend on the scalar field being interpolated. Here is a small example of simple 3x3x3 regular grid and a constant scalar field of 1.0 values, that is interpolated at the input data points.
Works for me.
grid_z1= [[[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] [[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]] [[ 1. 1. 1.] [ 1. 1. 1.] [ 1. 1. 1.]]]
Do you get the same triangulation?
from scipy.spatial import Delaunay Delaunay(points).vertices array([[ 1, 12, 10, 13], [ 1, 9, 12, 10], [ 1, 4, 10, 13], [ 1, 4, 12, 13], [ 1, 3, 4, 12], [ 1, 9, 10, 0], [ 1, 9, 12, 0], [ 1, 3, 12, 0], [ 1, 3, 4, 0], [21, 12, 10, 13], [21, 22, 12, 13], [21, 9, 12, 10], [21, 22, 10, 13], [21, 19, 22, 10], [21, 9, 10, 18], [21, 9, 12, 18], [21, 19, 10, 18], [21, 19, 22, 18], [15, 4, 12, 13], [15, 16, 12, 13], [15, 3, 4, 6], [15, 16, 4, 13], [15, 7, 16, 4], [15, 3, 4, 12], [15, 7, 4, 6], [15, 7, 16, 6], [25, 22, 12, 13], [25, 16, 12, 13], [25, 21, 22, 24], [25, 16, 22, 13], [25, 15, 16, 24], [25, 21, 12, 24], [25, 21, 22, 12], [25, 15, 12, 24], [25, 15, 16, 12], [23, 16, 22, 13], [23, 25, 16, 26], [23, 14, 16, 13], [23, 17, 14, 16], [23, 25, 16, 22], [23, 17, 16, 26], [23, 17, 14, 26], [23, 22, 10, 13], [23, 14, 10, 13], [23, 11, 14, 20], [23, 19, 10, 20], [23, 19, 22, 10], [23, 11, 10, 20], [23, 11, 14, 10], [ 5, 16, 4, 13], [ 5, 14, 16, 13], [ 5, 7, 16, 8], [ 5, 7, 16, 4], [ 5, 17, 16, 8], [ 5, 17, 14, 16], [ 5, 4, 10, 13], [ 5, 11, 14, 10], [ 5, 14, 10, 13], [ 5, 1, 10, 2], [ 5, 1, 4, 10], [ 5, 11, 10, 2]])
_______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
On Tue, Sep 21, 2010 at 8:17 AM, Adam Machnik <amachnik@gmail.com> wrote:
Hello, I am concerned in the difference in triangulation. I think that on such a simple grid there should be no difference from qhull results. FYI: I have tested the scipy.spatial module on my workstation. There is one test that fails. However it was already reported in the mailinglist, and it does not seem to be the problem. What can I do else ?
Make sure you have a clean install, i.e., remove the old one and the build directory and try again. Sometimes odd things can happen. <snip> Chuck
On Tue, Sep 21, 2010 at 09:17, Adam Machnik <amachnik@gmail.com> wrote:
Hello, I am concerned in the difference in triangulation. I think that on such a simple grid there should be no difference from qhull results.
What you call a "simple grid" is actually a degenerate set of points for Delaunay triangulation. There are a a large number of valid triangulations that satisfy the Delaunay condition. The way that qhull deals with degeneracy is to randomly perturb the points. While perhaps qhull should pick a consistent random seed in order to reproduce whichever of the arbitrarily chosen triangulations to return in your degenerate case, please be aware that interpolation using triangulation is not going to work very well for your case. Trilinear interpolation would be better. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
Tue, 21 Sep 2010 09:57:03 -0500, Robert Kern wrote:
On Tue, Sep 21, 2010 at 09:17, Adam Machnik <amachnik@gmail.com> wrote:
Hello, I am concerned in the difference in triangulation. I think that on such a simple grid there should be no difference from qhull results.
What you call a "simple grid" is actually a degenerate set of points for Delaunay triangulation. There are a a large number of valid triangulations that satisfy the Delaunay condition. The way that qhull deals with degeneracy is to randomly perturb the points.
That's the "joggle" mode of Qhull. The 2003.1 version included in Scipy can also work so that it first produces non-simplical facets, and in a second step splits them into simplices in an arbitrary way. See http://qhull.org/html/qh-optq.htm#Qt This is still sensitive to rounding error, and so it seems that results obtained with different optimization levels in the compiler are different. The problem here seems to be that degenerate facets with zero volume appear in the result, which the interpolation routines do not at the moment handle sensibly. This should be fixable. -- Pauli Virtanen
Thank you very much for your explanations. Indeed, I would like to use the n-linear interpolation.The problem is that I cannot find any python package that can do this on N-D dimension on the incomplete and irregular set of points. For regular grids I use "scipy.ndimage.interpolation.map_coordinates" and it works perfectly. I use also "scipy.interpolate.Rbf " to perform interpolation on irregular set of points using radial basis functions and it works also great. But when using Rbf the interpolation is nonlinear, and often inconsistent. The only package that I have found up to now is this new griddata() function. I hope that it will work for me when fixed these issues with the handling of degenerated zero volume cases on interpolation level. Pauli Vitranen, who wrote this function, says that it should be possible, so I wait with impatience to test it when available. Thanks, Adam On Tue, Sep 21, 2010 at 4:57 PM, Robert Kern <robert.kern@gmail.com> wrote:
On Tue, Sep 21, 2010 at 09:17, Adam Machnik <amachnik@gmail.com> wrote:
Hello, I am concerned in the difference in triangulation. I think that on such a simple grid there should be no difference from qhull results.
What you call a "simple grid" is actually a degenerate set of points for Delaunay triangulation. There are a a large number of valid triangulations that satisfy the Delaunay condition. The way that qhull deals with degeneracy is to randomly perturb the points. While perhaps qhull should pick a consistent random seed in order to reproduce whichever of the arbitrarily chosen triangulations to return in your degenerate case, please be aware that interpolation using triangulation is not going to work very well for your case. Trilinear interpolation would be better.
-- Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco _______________________________________________ SciPy-Dev mailing list SciPy-Dev@scipy.org http://mail.scipy.org/mailman/listinfo/scipy-dev
On Tue, Sep 21, 2010 at 13:35, Adam Machnik <amachnik@gmail.com> wrote:
Thank you very much for your explanations. Indeed, I would like to use the n-linear interpolation.The problem is that I cannot find any python package that can do this on N-D dimension on the incomplete and irregular set of points. For regular grids I use "scipy.ndimage.interpolation.map_coordinates" and it works perfectly.
"Trilinear interpolation" is a very specific kind of interpolation. It is only defined on regular grids. map_coordinates() is a generalization, I believe. Trilinear interpolation is not a general term for linear interpolation methods on 3D points.
I use also "scipy.interpolate.Rbf " to perform interpolation on irregular set of points using radial basis functions and it works also great. But when using Rbf the interpolation is nonlinear, and often inconsistent. The only package that I have found up to now is this new griddata() function. I hope that it will work for me when fixed these issues with the handling of degenerated zero volume cases on interpolation level. Pauli Vitranen, who wrote this function, says that it should be possible, so I wait with impatience to test it when available.
Regardless of whether it is possible to fix the Delaunay triangularization for these cases, I am trying to convey that the interpolation scheme is still not appropriate for rectilinear grids. If I have a point roughly in the middle of a grid cell, it will only get information from the simplex it happens to fall in rather than from all of the surrounding grid points. Which simplex it happens to fall in will be arbitrary because of the degeneracy. This will create inconsistencies across your grid as some grid cells will be broken up one way and other grid cells will be broken up others. There is no single interpolation method that works well for all inputs. The properties of the data are intimately associated with the interpolation technique that is best for it. For rectilinear grids, map_coordinates is the better choice. For scattered point clouds, griddata will work fine. Natural neighbors would be better, but we'll have to wait until someone implements that for 3D. -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco
On Tue, Sep 21, 2010 at 8:52 PM, Robert Kern <robert.kern@gmail.com> wrote:
On Tue, Sep 21, 2010 at 13:35, Adam Machnik <amachnik@gmail.com> wrote:
Thank you very much for your explanations. Indeed, I would like to use the n-linear interpolation.The problem is that I cannot find any python package that can do this on N-D dimension on the incomplete and irregular set of points. For regular grids I use "scipy.ndimage.interpolation.map_coordinates" and it works perfectly.
"Trilinear interpolation" is a very specific kind of interpolation. It is only defined on regular grids. map_coordinates() is a generalization, I believe. Trilinear interpolation is not a general term for linear interpolation methods on 3D points.
I use also "scipy.interpolate.Rbf " to perform interpolation on irregular set of points using radial basis functions and it works also great. But when using Rbf the interpolation is nonlinear, and often inconsistent. The only package that I have found up to now is this new griddata() function. I hope that it will work for me when fixed these issues with the handling of degenerated zero volume cases on interpolation level. Pauli Vitranen, who wrote this function, says that it should be possible, so I wait with impatience to test it when available.
Regardless of whether it is possible to fix the Delaunay triangularization for these cases, I am trying to convey that the interpolation scheme is still not appropriate for rectilinear grids. If I have a point roughly in the middle of a grid cell, it will only get information from the simplex it happens to fall in rather than from all of the surrounding grid points. Which simplex it happens to fall in will be arbitrary because of the degeneracy. This will create inconsistencies across your grid as some grid cells will be broken up one way and other grid cells will be broken up others.
There is no single interpolation method that works well for all inputs. The properties of the data are intimately associated with the interpolation technique that is best for it. For rectilinear grids, map_coordinates is the better choice. For scattered point clouds, griddata will work fine. Natural neighbors would be better, but we'll have to wait until someone implements that for 3D.
Thanks again for explanations. I think that I understand now the problem of using Delaunay triangularization for my rectilinear grids. Unfortunately it looks that I have a problem: my grids are rectilinear, but non-uniform (not equally spaced) and often incomplete (some points are missing). And to make things worse: they are often in 6D or more... And the facts are: Delaunay seems inappriopriate, the map_coordinates require equally spaced grids, Rbf method produces smooth but non-linear interpolation, and nobody implemented natural neighbors in N-dimensions... I think that I will stay with RbF interpolation...I wonder if it is possible to tune RbF basis functions to perform linear interpolation on my weird N-D grids... ? Thanks, Adam
Tue, 21 Sep 2010 20:35:06 +0200, Adam Machnik wrote: [clip]
griddata() function. I hope that it will work for me when fixed these issues with the handling of degenerated zero volume cases on interpolation level. [clip]
I believe it is fixed here: http://github.com/pv/scipy-work/tree/bug/griddata-nans Click the "download source" link to get a fixed tarball. If you can test this, that would be useful, since I cannot reproduce the issue you are seeing. If you want to help further, please also do >>> from scipy.spatial import Delaunay >>> tri = Delaunay(points) >>> numpy.savez('delny.npz', tri.__dict__) and send the 'delny.npz' file to me -- this way it should be possible to get a reproducible test case. *** If it is indeed fixed now, the problem was that the directed search for a simplex could stop at a degenerate one, in which barycentric coordinates and linear interpolation is not defined -- which then would produce nans. -- Pauli Virtanen
Hello Pauli, I have downloaded and installed a new development version and.... it works !!! No NaN on simple examples, and the interpolation seems OK in 3D. I will test it tomorow on my more complex irregular grids. Thank you for your help ! Adam On Tue, Sep 21, 2010 at 11:46 PM, Pauli Virtanen <pav@iki.fi> wrote:
Tue, 21 Sep 2010 20:35:06 +0200, Adam Machnik wrote: [clip]
griddata() function. I hope that it will work for me when fixed these issues with the handling of degenerated zero volume cases on interpolation level. [clip]
I believe it is fixed here:
[clip]
participants (4)
-
Adam Machnik -
Charles R Harris -
Pauli Virtanen -
Robert Kern