Skip to content

Commit ce85019

Browse files
jamestjspclaude
andcommitted
Add sb03md wrapper for slycot fallback
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 6cdd9ca commit ce85019

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

control/slicot_compat.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1122,7 +1122,7 @@ def mb03rd(n, A, X, pmax=1.0, tol=0.0, ldwork=None):
11221122
# If using slycot (not slicot), overwrite with direct imports from slycot
11231123
if _use_slycot and not _use_slicot:
11241124
from slycot import ( # noqa: F811
1125-
sb03md, sb03od, sb04md, sb04qd, sg03ad,
1125+
sb03od, sb04md, sb04qd, sg03ad,
11261126
sb02md, sb02mt, sg02ad, sb01bd,
11271127
sb10ad, sb10hd, ab08nd,
11281128
ab09ad, ab09md, ab09nd,
@@ -1133,3 +1133,10 @@ def mb03rd(n, A, X, pmax=1.0, tol=0.0, ldwork=None):
11331133
SlycotResultWarning as SlicotResultWarning,
11341134
SlycotArithmeticError as SlicotArithmeticError,
11351135
)
1136+
1137+
from slycot import sb03md57
1138+
1139+
def sb03md(n, C, A, U, dico, job='X', fact='N', trana='N', ldwork=None): # noqa: F811
1140+
"""Wrapper for slycot's sb03md57."""
1141+
ret = sb03md57(A, U, C, dico, job, fact, trana, ldwork)
1142+
return ret[2:]

0 commit comments

Comments
 (0)