[SciPy-Dev] Find points in delaunay triangulation : scipy.spatial vs. scipy.interpolation

Pablo Winant pablo.winant at gmail.com
Sun May 13 10:57:55 EDT 2012


Le 13/05/2012 08:44, josef.pktd at gmail.com a écrit :
> On Sat, May 12, 2012 at 8:13 PM, Pablo Winant<pablo.winant at gmail.com>  wrote:
>> Hi,
>>
>> I tried to use interpolation routines in scipy recently and I have found
>> two slight performance issues
>>
>>   - The LinearNDInterpolation object implemented in cython requires a
>> list of points and a list of values to be created. But is is not
>> documented how to change the values of the interpolator without doing
>> the mesh again. This is useful when one is solving the values of a
>> function at the vertices of the mesh : one doesn't want to do the
>> triangulation again and again. Maybe there could be a simple specific
>> method to set the values in this case. In that case it would consist in
>> changing the value of a property but it would be consistent with more
>> general interpolation schemes.
>>
>> - I tried to use the delaunay object from scipy and noticed a strange
>> thing: for a given set of coordinates it takes longer to get the indices
>> of the triangles containing the points than it takes to perform the
>> interpolation using LinearND object. This is puzzling since apparently
>> the implementation of LinearND performs many calls to the qhull library
>> to get this indices. Attached is a simple exampe demonstrating this anomaly.
>>
>> One last thing: I have written an interpolation object on sparse grids,
>> using smolyak product of chebychev polynomials. It is written in pure
>> python (vectorized) and licensed under the bsd license. Currently it
>> lives in another library but I guess it would make more sense to have
>> something like that in a more general scientific lib. Let me know if you
>> are interested. (it is available there anyway:
>> https://github.com/albop/dynare-python/tree/master/dolo/src/dolo/numeric: chebychev.py
>> and smolyak.py)
> Pablo,
>
> what is actually your license for dolo?

It used to be GPL, but I changed it to BSD a while ago, precisely in 
order to integrate better with the python community.
As I was using google-code at that time I switched to the new-bsd 
license which was the only bsd option.
If I understand well, it is refered to as BSD-3.

Now I must say I am a bit lost in this jungle, so I guess I would follow 
your suggestion if you say BSD-n is better.

There several other parts of the library which would fit better outside 
(such as a nonlinear solver with complementarity constraints) so it is 
important to me that the license makes a sensible relocation of the code 
possible.

>
> your license file is GPL
Thank you for spotting that. I will need to properly do all these legal 
stuff once I am sure about the good license.
> https://github.com/albop/dynare-python/blob/master/dolo/LICENSE
> but setup.py says BSD and and I found another package using some of
> your code as BSD-2
Can you tell me which one it is ?

Best,

Pablo

>
> Thanks,
>
> Josef
>
>> Best regards,
>>
>> Pablo
>> _______________________________________________
>> SciPy-Dev mailing list
>> SciPy-Dev at scipy.org
>> http://mail.scipy.org/mailman/listinfo/scipy-dev
> _______________________________________________
> SciPy-Dev mailing list
> SciPy-Dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-dev




More information about the SciPy-Dev mailing list