Open embt opened 3 years ago
Good day Emil,
Thanks a lot for using our package!
Looks like sympy
changed the behavior/location of their Zero object (this suggests maybe it was 14 months ago ?). Thanks for the quick fix you provided! Would you mind sending out a PR for this ?
Cheers,
Pierre
I hope I did everything right, I'm a bit new to GitHub. Thanks!
Hello, first of all big thanks for supporting the package! I had a problem with the function relax_dgo and also a possible solution: from pytfa.optim.relaxation import relax_dgo relaxed_model, slack_model, relax_table = relax_dgo(mytfa)
The follwing Error occours:
~\AppData\Roaming\Python\Python38\site-packages\pytfa\optim\utils.py in symbol_sum(variables) 108 k=0 109 # If we encounter a zero, which is a special type, increase k --> 110 while isinstance(variables[k], sympy.numbers.Zero) and k<len(variables): 111 k+=1 112 if k == len(variables):
AttributeError: module 'sympy' has no attribute 'numbers'
By changing sympy.numbers.Zero to sympy.core.numbers.Zero in ~\AppData\Roaming\Python\Python38\site-packages\pytfa\optim\utils.py the Error is gone. This seems like sympy changed something there.
I'm using Python Python 3.8.5 and sympy version 1.6.2
Regards, Emil