Menu

Commit [r26887]  Maximize  Restore  History

Fix for the target function aliasing in the target_functions.relax_fit C module class.

Changing the values of the Relax_fit_methods C array in the __init__() method was not working, as it
was changing the class methods rather than the instance methods. Instead the tp_getattro property
is being used and the Relax_fit_getattro() function is used for the target function switching. This
allows the target function to be changed via the __getattr__() method. However this method is being
called once for each target function call, hence it is not efficient. This follows from
http://stackoverflow.com/a/27246336/4309197.

bugman 2014-12-02

changed /branches/relax_fit_c_class/target_functions/relax_fit.c
/branches/relax_fit_c_class/target_functions/relax_fit.c Diff Switch to side-by-side view
Loading...
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.