Skip to content
Discussion options

You must be logged in to vote

The error is occurring because the entries in npc and dpc are of type sympy.core.numbers.Float:

In [17]: type(npc[0])
Out[17]: sympy.core.numbers.Float

The tf function is expecting something of type int, float, complex, or np.number.

A quick fix is to use

tf2 = control.tf([float(d) for d in npc], [float(d) for d in dpc])

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@oe8bck
Comment options

Answer selected by oe8bck
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants