Skip to content

Commit 76dee0d

Browse files
committed
additional fixes for github actions warnings
1 parent cfccc28 commit 76dee0d

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

control/optimal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -956,7 +956,7 @@ def solve_ocp(
956956
transpose=None, return_states=True, print_summary=True, log=False,
957957
**kwargs):
958958

959-
"""Compute the solution to an optimal control problem.
959+
r"""Compute the solution to an optimal control problem.
960960
961961
The optimal trajectory (states and inputs) is computed so as to
962962
approximately mimimize a cost function of the following form (for

control/stochsys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,14 @@ def lqe(*args, **kwargs):
183183

184184
# contributed by Sawyer B. Fuller <minster@uw.edu>
185185
def dlqe(*args, **kwargs):
186-
"""dlqe(A, G, C, QN, RN, [, N])
186+
r"""dlqe(A, G, C, QN, RN, [, N])
187187
188188
Linear quadratic estimator design (Kalman filter) for discrete-time
189189
systems. Given the system
190190
191191
.. math::
192192
193-
x[n+1] &= Ax[n] + Bu[n] + Gw[n] \\\\
193+
x[n+1] &= Ax[n] + Bu[n] + Gw[n] \\
194194
y[n] &= Cx[n] + Du[n] + v[n]
195195
196196
with unbiased process noise w and measurement noise v with covariances

control/xferfcn.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,13 @@ def __str__(self, var=None):
468468
numstr = _tf_polynomial_to_string(self.num[no][ni], var=var)
469469
denstr = _tf_polynomial_to_string(self.den[no][ni], var=var)
470470
elif self.display_format == 'zpk':
471-
z, p, k = tf2zpk(self.num[no][ni], self.den[no][ni])
471+
num = self.num[no][ni]
472+
if num.size == 1 and num.item() == 0:
473+
# Catch a special case taht SciPy doesn't handle
474+
z, p, k = tf2zpk([1.], self.den[no][ni])
475+
k = 0
476+
else:
477+
z, p, k = tf2zpk(self.num[no][ni], self.den[no][ni])
472478
numstr = _tf_factorized_polynomial_to_string(
473479
z, gain=k, var=var)
474480
denstr = _tf_factorized_polynomial_to_string(p, var=var)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy