[SciPy-Dev] Multilinear interpolation
Mon Feb 25 06:04:13 CST 2013
On 21/02/2013 20:25, Robert Kern wrote:
> On Thu, Feb 21, 2013 at 7:04 PM, Pauli Virtanen <firstname.lastname@example.org> wrote:
>> 21.02.2013 21:01, Robert Kern kirjoitti:
>>> On Thu, Feb 21, 2013 at 2:37 PM, Pablo Winant <email@example.com> wrote:
>>>> I hesitate between two options that seem be to be used somewhere in
>>>> scipy : Mako templates and code generation via a simple python module.
>>>> Do you have a preference ?
>>> Since we're already using Mako in scipy.interpolate, I would recommend
>>> giving it a try.
>> We're actually not using Mako any more. Using Tempita instead could be
>> better, as that we can bundle with Scipy.
> Sorry, I had an old checkout. Pablo, do check out Tempita, then. It is
> pretty nice:
So I made an attempt using tempita in the case of regularly spaced
grids. For now, it is in a temporary repository in github:
There is a file multilinear_cython.pyx.in which must be interpreted to
produce multilinear_cython.pyx . There is also a multilinear.py file
containing an object oriented wrapper for the compiled routines.
Here is an example:
Before, I do the same for irregularly spaced grid, I have some questions:
- I included the templates as Python strings in the .pyx.in file . Was
there a better way ?
- I was not sure about how to deal with single/double precision in the
> Robert Kern
> SciPy-Dev mailing list
More information about the SciPy-Dev