Skip to content

Commit bf19193

Browse files
committed
Remove repr_format mentions; fix xferfcn static check per @slivingston
1 parent e10d481 commit bf19193

File tree

4 files changed

+3
-11
lines changed

4 files changed

+3
-11
lines changed

control/iosys.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,6 @@ class InputOutputSystem(object):
151151
the index of the corresponding array.
152152
input_labels, output_labels, state_labels : list of str
153153
List of signal names for inputs, outputs, and states.
154-
repr_format : str
155-
String representation format ('iosys' or 'loadable').
156154
shape : tuple
157155
2-tuple of I/O system dimension, (noutputs, ninputs).
158156

control/tests/docstrings_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,6 @@ def test_deprecated_functions(module, prefix):
325325
# List of attributes defined in a parent class (no need to warn)
326326
iosys_parent_attributes = [
327327
'input_index', 'output_index', 'state_index', # rarely used
328-
'repr_format', # rarely used
329328
'states', 'nstates', 'state_labels', # not need in TF, FRD
330329
'params', 'outfcn', 'updfcn' # NL I/O, SS overlap
331330
]

control/tests/xferfcn_test.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ class TestXferFcn:
3030

3131
def test_constructor_bad_input_type(self):
3232
"""Give the constructor invalid input types."""
33-
# MIMO requires lists of lists of vectors (not lists of vectors)
34-
# 13 Dec 2024: This now works correctly: creates static array (as tf)
35-
# with pytest.raises(TypeError):
36-
# TransferFunction([[0., 1.], [2., 3.]], [[5., 2.], [3., 0.]])
37-
# good input
38-
TransferFunction([[[0., 1.], [2., 3.]]],
39-
[[[5., 2.], [3., 0.]]])
40-
4133
# Single argument of the wrong type
4234
with pytest.raises(TypeError):
4335
TransferFunction([1])

control/xferfcn.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,9 @@ def __init__(self, *args, **kwargs):
223223
for poly in np.nditer(arr, flags=['refs_ok']):
224224
if poly.item().size > 1:
225225
static = False
226+
break
227+
if not static:
228+
break
226229

227230
defaults = args[0] if len(args) == 1 else \
228231
{'inputs': num.shape[1], 'outputs': num.shape[0]}

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