[SciPy-User] LinearNDInterpolator hanging

Pauli Virtanen pav@iki...
Sun Mar 27 09:42:24 CDT 2011

On Sun, 27 Mar 2011 18:19:47 +1100, Wolfgang Kerzendorf wrote:
> Thanks a lot Paul. I'm looking forward to the fix. 

It's fixed now in the Git tree.

> Ah one other thing:
> Is there a way to limit interpolation if the triangle is a certain size.
> Meaning, that it will return nan or the fill_value if the values are too
> far away. I can send you a plot if that helps.

This would require adding to the algorithm a check whether a triangle is 
"masked" or not --- then the user could specify the mask using whatever 
criterion they deem useful. This would not be too difficult to do, at 
least if one does not think about gradient estimation, but I don't know 
how widely useful this would be.

You can almost emulate this by going through the simplices in the 
triangulation, and setting the data values to `nan` for the vertices that 
belong to triangles that are too large. This will kill also the 
neighbouring triangles, though.


More information about the SciPy-User mailing list