Skip to content

Commit e6b837d

Browse files
Update control/passivity.py
Co-authored-by: Ben Greiner <code@bnavigator.de>
1 parent a17e3c8 commit e6b837d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

control/passivity.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,9 @@ def P_pos_def_constraint(n):
175175
return sol["x"]
176176

177177
except ZeroDivisionError as e:
178-
print(e)
179-
print(
180-
"""The system is probably ill conditioned.
181-
Consider perturbing the system matrices a small amount."""
182-
)
183-
raise(ZeroDivisionError)
178+
raise ValueError("The system is probably ill conditioned. "
179+
"Consider perturbing the system matrices by a small amount."
180+
) from e
184181

185182

186183

0 commit comments

Comments
 (0)