Skip to content

Commit 7726521

Browse files
committed
fixed bug with editing constant parameters
1 parent 60567ce commit 7726521

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

spb/series/control.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -712,7 +712,8 @@ def get_data(self):
712712

713713
if self.is_interactive:
714714
tf = self.expr.subs(self.params)
715-
self.system = tf_to_control(tf)
715+
with param.edit_constant(self):
716+
self.system = tf_to_control(tf)
716717

717718
control_kw = {}
718719
sym, start, end = self.range_omega
@@ -921,7 +922,8 @@ def get_data(self):
921922

922923
if self.is_interactive:
923924
tf = self.expr.subs(self.params)
924-
self.system = tf_to_control(tf)
925+
with param.edit_constant(self):
926+
self.system = tf_to_control(tf)
925927

926928
self._zeros = self.system.zeros()
927929
self._poles = self.system.poles()
@@ -995,7 +997,8 @@ def _get_data_helper(self):
995997

996998
if self.is_interactive:
997999
tf = self.expr.subs(self.params)
998-
self.system = tf_to_control(tf)
1000+
with param.edit_constant(self):
1001+
self.system = tf_to_control(tf)
9991002

10001003
# create (or update) the discretized domain
10011004
_, start, end = self.range_t
@@ -1154,7 +1157,8 @@ def _get_data_helper(self):
11541157
np = import_module("numpy")
11551158
if self.is_interactive:
11561159
tf = self.expr.subs(self.params)
1157-
self.system = tf_to_control(tf)
1160+
with param.edit_constant(self):
1161+
self.system = tf_to_control(tf)
11581162
if self.return_poles:
11591163
points = self.system.poles()
11601164
else:

0 commit comments

Comments
 (0)