- Notifications
You must be signed in to change notification settings - Fork441
Description
Discussed in#852
Originally posted bycodeFighter2022 January 26, 2023
Hi,
First of all, thanks a lot for this amazing toolbox!
I think, I found a bug, or a suggestion for improvement, when running the prey example:
https://python-control.readthedocs.io/en/0.9.3.post2/iosys.html#example
When I run the code of the prey example, in particular the linearization,lin_predprey = ct.linearize(io_predprey, xeq, 0)
I get the following errorValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.
After analyzing the code, I think the origin of the error is that in predprey_rhs() dH is of type numpy arrary, while dL is not.
I think others ones are much deeper in the code than me. That is why I post this topic instead of a pull request.
Maybe a type check with dummy input/output data already solves these kind of issues when initializing the constructor. I think such a feature could save people some time.
Best,
codeFighter2022
Python: 3.810
Control: 0.9.3.post2
I installed the toolbox via pip