29 Jan 2012 18:47
Re: Installing just a .pxd with Distutils
Robert Kern <robert.kern <at> gmail.com>
2012-01-29 17:47:09 GMT
2012-01-29 17:47:09 GMT
On 1/29/12 3:46 PM, Thomas Wiecki wrote: > Hi, > > there still seems to be an issue with importing the module. It works > fine when calling functions but complains that gsl is not cimported > when trying to use a gsl type. > > cdef gsl.gsl_integration_workspace * W > > Error compiling Cython file: > ------------------------------------------------------------ > ... > > return gsl.gsl_ran_gaussian_pdf(x, sigma) + mu > > cdef double cdf_numerical(double x, double mu, double sigma): > cdef double alpha, result, error, expected > cdef gsl.gsl_integration_workspace * W > ^ > ------------------------------------------------------------ > > integrate.pyx:15:9: 'gsl' is not a cimported module > > The code in question lives here: > https://github.com/twiecki/CythonGSL/blob/master/examples/integrate.pyx This: from cython_gsl import gsl Should be this: from cython_gsl cimport gsl -- -- 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
RSS Feed