Skip to content

Commit a05351b

Browse files
authored
Merge pull request #683 from murrayrm/lqr_scipy
LQR using SciPy
2 parents 2ce4bbd + 801f282 commit a05351b

File tree

6 files changed

+521
-545
lines changed

6 files changed

+521
-545
lines changed

control/exception.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,13 @@ class ControlNotImplemented(NotImplementedError):
6161
pass
6262

6363
# Utility function to see if slycot is installed
64+
slycot_installed = None
6465
def slycot_check():
65-
try:
66-
import slycot
67-
except:
68-
return False
69-
else:
70-
return True
66+
global slycot_installed
67+
if slycot_installed is None:
68+
try:
69+
import slycot
70+
slycot_installed = True
71+
except:
72+
slycot_installed = False
73+
return slycot_installed

0 commit comments

Comments
 (0)