>>> from mpmath import *
>>> findroot(lambda x: sin(60*degree)-6/(sqrt(x**2+40)), 0,
solver='anewton', verbose=1)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/one/src/mpmath/svn/mpmath/settings.py", line 135, in g
return f(*args, **kwargs)
File "mpmath/optimization.py", line 909, in findroot
if not isinstance(x, (list, tuple, matrix)):
UnboundLocalError: local variable 'x' referenced before assignment
Somehow the solver (being an iterator) cancels immediately, so that x is
undefined.
Original issue reported on code.google.com by Vinzent.Steinberg@gmail.com on 27 Jan 2009 at 7:46
Original issue reported on code.google.com by
Vinzent.Steinberg@gmail.com
on 27 Jan 2009 at 7:46