Oscar Benjamin
Oscar Benjamin
A simple fix here is to delete most of the code: ```diff diff --git a/sympy/physics/control/lti.py b/sympy/physics/control/lti.py index decf1ee659..ba2211f0c2 100644 --- a/sympy/physics/control/lti.py +++ b/sympy/physics/control/lti.py @@ -5152,9 +5152,7 @@ def get_asymptotic_stability_conditions(self): (1/3...
> I decided to write a class instead of a function because it needs to store very important information (`zero_row_case`, `auxiliary_polynomial`) during its creation. We cannot just add a function...
> I found easiest to read a code written as I have done I found it hard to read the code and it took a while for me to realise...
> I think that the algorithm can be modified to use division free method: This is a division free version assuming your formula is correct: ```python from sympy.polys.sqfreetools import dup_sqf_part...
Use rational rather than float: ```python In [6]: linsolve([C4, 2*C3 + C4 - S(1)/3, 3*C3 + C4 - S(1)/2], [C3, C4]) Out[6]: {(1/6, 0)} ```
Maybe `linsolve` should be a bit better about floats when handling an overdetermined system like this. The problem is that row reduction leads to a row that is not exactly...
I think that the best solution would be adding some capability to solve overdetermined systems with Floats based on numerical heuristics. Maybe for a pure Float system of equations like...
> I am unsure what the advantage would be for using `mpmath.lu_solve` versus `numpy.linalg.lstsq`. The biggest difference is that mpmath is a hard dependency for sympy which numpy is not....
Internally `solve` will end up calling the same matrix routines as `linsolve`. The difference is that with solve's default option `rational=True` it will convert floats to rational on input. Fundamentally...
> Or, it seems we could change `linsolve` to `solve` and it "just works" for a much greater variety of inputs. It would be better to either do this automatically...