[SciPy-User] g++ Compilation error using weave

Warren Weckesser warren.weckesser@enthought....
Tue Dec 7 20:47:27 CST 2010

On Tue, Dec 7, 2010 at 8:16 PM, Gus Ishere <gus.is.here@gmail.com> wrote:

> I'm trying to use a very simple code snippet in weave
> http://codepad.org/zAaKKVhG
> But I get the following error: "error: cannot convert `float' to
> `PyObject*' in return"
> I pasted a more verbose error in the link.
> I'd appreciate any light.

Hi Gustavo,

Don't use a 'return' statement; instead, assign the return value to the
variable 'return_val':

import scipy.weave
from scipy.weave import converters

def a(): #weave for integration
    return_val = 1.0f;
    return scipy.weave.inline(code,[],
                        compiler = 'gcc')

print a()

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20101207/986146f0/attachment.html 

More information about the SciPy-User mailing list