I recently reinstalled my python environment and the code that worked very fast now crawls at best (usually just freezes, taking up more and more memory).
The point at which the code hangs:
solve(exp(-alpha * x**2) - 0.01, alpha)
I was able to reproduce this problem with a new IPython 0.13.1 session:
In [1]: from sympy import solve, Symbol, exp
In [2]: x = 14.7296138519
In [3]: alpha = Symbol('alpha', real=True)
In [4]: solve(exp(-alpha * x**2) - 0.01, alpha)
this works for integers, but also pretty slow. In the source code, I went in cycles on this search of hundreds of different alpha for different values of x (except 14.7296138519), and it took no more than a second.
any thoughts?
source
share