Skip to content

Commit 78ce52f

Browse files
author
Kevin Chen
committed
Implemented deep copy of A in gram. This is a temporary solution.
Kevin K. Chen <kkchen@princeton.edu>
1 parent f9fed5a commit 78ce52f

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/statefbk.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,9 @@ def gram(sys,type):
266266
>>> Wo = gram(sys,'o')
267267
268268
"""
269+
270+
from copy import deepcopy
271+
269272
#Check for ss system object, need a utility for this?
270273

271274
#TODO: Check for continous or discrete, only continuous supported right now
@@ -299,7 +302,8 @@ def gram(sys,type):
299302
raise ControlSlycot("can't find slycot module 'sb03md'")
300303
n = sys.states
301304
U = np.zeros((n,n))
302-
out = sb03md(n, C, sys.A, U, dico, 'X', 'N', trana)
305+
A = deepcopy(sys.A)
306+
out = sb03md(n, C, A, U, dico, 'X', 'N', trana)
303307
gram = out[0]
304308
return gram
305309

0 commit comments

Comments
 (0)