We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9d869e commit c7c7b47Copy full SHA for c7c7b47
1 file changed
control/iosys.py
@@ -1645,8 +1645,10 @@ def rootfun(z):
1645
# and were processed above.
1646
1647
# Get the states and inputs that were not listed as fixed
1648
- state_vars = np.delete(np.array(range(nstates)), ix)
1649
- input_vars = np.delete(np.array(range(ninputs)), iu)
+ state_vars = (range(nstates) if not len(ix)
+ else np.delete(np.array(range(nstates)), ix))
1650
+ input_vars = (range(ninputs) if not len(iu)
1651
+ else np.delete(np.array(range(ninputs)), iu))
1652
1653
# Set the outputs and derivs that will serve as constraints
1654
output_vars = np.array(iy)
0 commit comments