@@ -160,28 +160,46 @@ def test_isdtime(self, objfun, arg, dt, ref, strictref):
160
160
@pytest .mark .parametrize ("fcn" , [ct .ss ,ct .tf ,ct .frd ,ct .ss2io ])
161
161
@pytest .mark .parametrize ("nstate, nout, ninp, omega, squeeze, shape" , [
162
162
[1 ,1 ,1 ,0.1 ,None , ()],# SISO
163
+ [1 ,1 ,1 ,np .array (0.1 ),None , ()],
163
164
[1 ,1 ,1 , [0.1 ],None , (1 ,)],
164
165
[1 ,1 ,1 , [0.1 ,1 ,10 ],None , (3 ,)],
165
166
[2 ,1 ,1 ,0.1 ,True , ()],
167
+ [2 ,1 ,1 ,np .array (0.1 ),True , ()],
166
168
[2 ,1 ,1 , [0.1 ],True , ()],
167
169
[2 ,1 ,1 , [0.1 ,1 ,10 ],True , (3 ,)],
168
170
[3 ,1 ,1 ,0.1 ,False , (1 ,1 )],
171
+ [3 ,1 ,1 ,np .array (0.1 ),False , (1 ,1 )],
169
172
[3 ,1 ,1 , [0.1 ],False , (1 ,1 ,1 )],
170
173
[3 ,1 ,1 , [0.1 ,1 ,10 ],False , (1 ,1 ,3 )],
171
174
[1 ,2 ,1 ,0.1 ,None , (2 ,1 )],# SIMO
175
+ [1 ,2 ,1 ,np .array (0.1 ),None , (2 ,1 )],
172
176
[1 ,2 ,1 , [0.1 ],None , (2 ,1 ,1 )],
173
177
[1 ,2 ,1 , [0.1 ,1 ,10 ],None , (2 ,1 ,3 )],
174
178
[2 ,2 ,1 ,0.1 ,True , (2 ,)],
179
+ [2 ,2 ,1 ,np .array (0.1 ),True , (2 ,)],
175
180
[2 ,2 ,1 , [0.1 ],True , (2 ,)],
176
181
[3 ,2 ,1 ,0.1 ,False , (2 ,1 )],
182
+ [3 ,2 ,1 ,np .array (0.1 ),False , (2 ,1 )],
177
183
[3 ,2 ,1 , [0.1 ],False , (2 ,1 ,1 )],
178
184
[3 ,2 ,1 , [0.1 ,1 ,10 ],False , (2 ,1 ,3 )],
179
185
[1 ,1 ,2 , [0.1 ,1 ,10 ],None , (1 ,2 ,3 )],# MISO
180
186
[2 ,1 ,2 , [0.1 ,1 ,10 ],True , (2 ,3 )],
181
187
[3 ,1 ,2 , [0.1 ,1 ,10 ],False , (1 ,2 ,3 )],
188
+ [1 ,1 ,2 ,0.1 ,None , (1 ,2 )],
189
+ [1 ,1 ,2 ,np .array (0.1 ),None , (1 ,2 )],
190
+ [1 ,1 ,2 ,0.1 ,True , (2 ,)],
191
+ [1 ,1 ,2 ,np .array (0.1 ),True , (2 ,)],
192
+ [1 ,1 ,2 ,0.1 ,False , (1 ,2 )],
193
+ [1 ,1 ,2 ,np .array (0.1 ),False , (1 ,2 )],
182
194
[1 ,2 ,2 , [0.1 ,1 ,10 ],None , (2 ,2 ,3 )],# MIMO
183
195
[2 ,2 ,2 , [0.1 ,1 ,10 ],True , (2 ,2 ,3 )],
184
- [3 ,2 ,2 , [0.1 ,1 ,10 ],False , (2 ,2 ,3 )]
196
+ [3 ,2 ,2 , [0.1 ,1 ,10 ],False , (2 ,2 ,3 )],
197
+ [1 ,2 ,2 ,0.1 ,None , (2 ,2 )],
198
+ [1 ,2 ,2 ,np .array (0.1 ),None , (2 ,2 )],
199
+ [2 ,2 ,2 ,0.1 ,True , (2 ,2 )],
200
+ [2 ,2 ,2 ,np .array (0.1 ),True , (2 ,2 )],
201
+ [3 ,2 ,2 ,0.1 ,False , (2 ,2 )],
202
+ [3 ,2 ,2 ,np .array (0.1 ),False , (2 ,2 )],
185
203
])
186
204
def test_squeeze (self ,fcn ,nstate ,nout ,ninp ,omega ,squeeze ,shape ):
187
205
# Create the system to be tested
@@ -194,8 +212,8 @@ def test_squeeze(self, fcn, nstate, nout, ninp, omega, squeeze, shape):
194
212
sys = fcn (ct .rss (nstate ,nout ,ninp ))
195
213
196
214
# Convert the frequency list to an array for easy of use
197
- isscalar = not hasattr (omega , '__len__' )
198
- omega = np . array ( omega )
215
+ omega = np . asarray (omega )
216
+ isscalar = omega . ndim == 0
199
217
200
218
# Call the transfer function directly and make sure shape is correct
201
219
assert sys (omega * 1j ,squeeze = squeeze ).shape == shape