You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to replace sympy.linsolve with symengine.linsolve in a project of mine, it worked well until I tried to solve an underdetermined system, upon the python process crashed. The reason for this is that I'm using a debug build of symengine (to increase chances of discovering bugs through asserts). In this case however we have an assert which doesn't indicate an internal error in the function, but rather that there exists no solutions to the problem:
My instinct is to change fraction_free_gauss_jordan_solve (and probably it's sibling-functions as well, I haven't checked) to return an int (0 for success, 1 for when unable to solve the problem, or maybe i+1 to return as much information as possible?). And have either it's calling function throw an exception in symengine or propagate the return flag back to symengine.py and raise a python-exceptoin from there. What do you think?
I tried to replace
sympy.linsolve
withsymengine.linsolve
in a project of mine, it worked well until I tried to solve an underdetermined system, upon the python process crashed. The reason for this is that I'm using a debug build of symengine (to increase chances of discovering bugs through asserts). In this case however we have an assert which doesn't indicate an internal error in the function, but rather that there exists no solutions to the problem:https://github.com/symengine/symengine/blob/d6718a0794c3db0dc2beeb1553c0075ac6b58c92/symengine/dense_matrix.cpp#L1261C15-L1261C15
My instinct is to change
fraction_free_gauss_jordan_solve
(and probably it's sibling-functions as well, I haven't checked) to return anint
(0 for success, 1 for when unable to solve the problem, or maybei+1
to return as much information as possible?). And have either it's calling function throw an exception insymengine
or propagate the return flag back tosymengine.py
and raise a python-exceptoin from there. What do you think?EDIT:
symengine.py
when using solve: https://github.com/symengine/symengine.py/blob/b0f15af6db3c8e297cc59620c80e056d6e94f41e/symengine/lib/symengine_wrapper.in.pyx#L4001symengine/symengine/solve.cpp
Line 563 in d6718a0
The text was updated successfully, but these errors were encountered: