ilayn / harold

An open-source systems and controls toolbox for Python3
MIT License
173 stars 19 forks source link

RecursionError: maximum recursion depth exceeded while calling a Python object #73

Closed jamestjsp closed 2 years ago

jamestjsp commented 3 years ago

A RecursionError is thrown if we try to multiply a statespace MIMO (Multi input single output or Single input Multi output ) model with a statespace/Transfer SISO model. This issue can be worked around by converting the MIMO model to a Transfer object before multiplying.

Sample Multi input single output

G1 = Transfer( [ [ [1], [1] ] ], # end of num [1,2,1] # common den ) G2 = transfer_to_state(G1) G3 = Transfer([1], [1,0]) #Pure integrator

G4 = G1 G3 will work, but G5 = G2 G3 will cause a RecursionError.


Sample Single input Multi output


G1 = Transfer( [ [1], [1] ], # end of num [1,2,1] # common den ) G2 = transfer_to_state(G1) G3 = Transfer([1], [1,0]) #Pure integrator

G4 = G1 G3 will work, but G5 = G2 G3 will cause a RecursionError.

ilayn commented 3 years ago

I will fix this together with a few other things. Root locus is kind of ready. Hence hopefully we can have the new release on PyPI

jamestjsp commented 3 years ago

That's an awesome update.