[SciPy-user] Has some met such a problem? (genetic algorithm bugfix)
Rich Drewes
drewes at interstice.com
Sat Jan 22 20:38:51 EST 2005
Qingliang:
I had the same problem you reported trying to use the genetic algorithm
example in scipy: "attributeError: rv_frozen instance has no attribute
'__getitem__'".
You can solve this by replacing in site-packages/scipy/ga/gene.py the line:
f = rv.norm(old,w)[0]
with:
f = rv.norm.rvs(old,w)[0]
I'm guessing that the interface to the Gaussian routine changed at some
point and nobody back-ported a change to the genetic algorithm test program.
With this change, the example program runs correctly.
Rich Drewes
More information about the SciPy-User
mailing list