[SciPy-user] Fast Gauss Transform
david.huard at gmail.com
Tue Mar 21 14:40:19 CST 2006
I finally followed the path of least resistance and tried to wrap Yang's
package using Swig but it seems like I'm out of my depth here. I managed to
create a python module, but when I call the FastGauss class, it complains
that the class asks for double * and that it receives a numpy.array. I guess
the interface I provided is not correct, but I couldn't find any example
that I could follow step by step.
I also tried to wrap the class with f2py, but python complains :
ImportError: dynamic module does not define init function (initfgt)
Could this be because the initialization of the c++ class is in the header
file and f2py seems to ignore it ?
Could you direct me toward the most efficient way to get a working python
module ? swig ? f2py ?
2006/3/21, David Huard <david.huard at gmail.com>:
> That was my first impulse, however, I came across an article comparing
> different fast kde algorithms and Yang's performance seemed overated (i.e.
> not faster than the naive implementation). The conclusion was that the
> kd-tree method (A.G Gray) was the most efficient for N-D problems by
> orders of magnitude. I have no clue yet what this is about but I'll gladly
> share the code once it is functional.
> 2006/3/20, Robert Kern <robert.kern at gmail.com>:
> > David Huard wrote:
> > > Hi,
> > >
> > > Is anyone aware of a piece of code for N-D Fast Gauss Transform (in
> > > python, C or fortran) ? The only codes I could find were for one
> > > dimensional cases (Strain's), or in C++ (Yang) but relied on the
> > matlab
> > > mex library. I used stats.gaussian_kde but it proves too slow for
> > large
> > > arrays (4 x 100 000)
> > I don't know of any, but if you find some suitably licensed code or
> > write one
> > yourself, I would like to put it into scipy to speed up gaussian_kde.
> > By the way, Yang's code doesn't seem to require Matlab. It just has a
> > Matlab
> > wrapper around it. It should be relatively easy to wrap it for Python.
> > --
> > Robert Kern
> > robert.kern at gmail.com
> > "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-user mailing list
> > SciPy-user at scipy.net
> > http://www.scipy.net/mailman/listinfo/scipy-user
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user