[SciPy-User] leastsq and cython
David Baddeley
david_baddeley at yahoo.com.au
Sat Sep 25 17:03:38 EDT 2010
I've, run into a similar problem, it's due to the fact that native methods (ie
ones loaded from c libraries) are not quite the same as pure python function
objects & don't possess all the nice attributes. It's been a while, but I seem
to remember that this error crops up when leastsq is trying to print some form
of status message with the function name in it. I've circumvented the problem by
making a thin python wrapper function which just calls my c method. This works,
but is not ideal, as you introduce additional function call overhead. If anyone
out there knows of a better solution I'd also be interested.
cheers,
David
----- Original Message ----
From: Till Stensitzki <mail.till at gmx.de>
To: scipy-user at scipy.org
Sent: Sun, 26 September, 2010 6:15:09 AM
Subject: [SciPy-User] leastsq and cython
Hello,
i have a problem with scipy.optimize.leastsq and cython.
To make my fitting procedure faster and cythonized parts of it and got a
factor 2 speedup.
But if i try to use the cython version with leastsq i get:
AttributeError: 'builtin_function_or_method' object has no attribute
'func_name'
any suggestions?
I am using scipy 0.8 and cython 0.13 on Windows with Python 2.6.
_______________________________________________
SciPy-User mailing list
SciPy-User at scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user
More information about the SciPy-User
mailing list