Skip to content

Commit d5156e5

Browse files
committed
Lint: remove unused variables, or prefix with _
Where it's clear that function is called for side effects (e.g., in a q`with pytest.raises` block), don't assign function output. Where it's not clear, e.g., binary ops on LTI objects, call result `_sys` or similar. There are plenty of in-between cases: for those I chose based on understandability.
1 parent cf77f99 commit d5156e5

24 files changed

Lines changed: 218 additions & 268 deletions

control/tests/bdalg_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -347,19 +347,19 @@ def test_bdalg_udpate_names_errors():
347347
sys2 = ctrl.rss(2, 1, 1)
348348

349349
with pytest.raises(ValueError, match="number of inputs does not match"):
350-
sys = ctrl.series(sys1, sys2, inputs=2)
350+
ctrl.series(sys1, sys2, inputs=2)
351351

352352
with pytest.raises(ValueError, match="number of outputs does not match"):
353-
sys = ctrl.series(sys1, sys2, outputs=2)
353+
ctrl.series(sys1, sys2, outputs=2)
354354

355355
with pytest.raises(ValueError, match="number of states does not match"):
356-
sys = ctrl.series(sys1, sys2, states=2)
356+
ctrl.series(sys1, sys2, states=2)
357357

358358
with pytest.raises(ValueError, match="number of states does not match"):
359-
sys = ctrl.series(ctrl.tf(sys1), ctrl.tf(sys2), states=2)
359+
ctrl.series(ctrl.tf(sys1), ctrl.tf(sys2), states=2)
360360

361361
with pytest.raises(TypeError, match="unrecognized keywords"):
362-
sys = ctrl.series(sys1, sys2, dt=1)
362+
ctrl.series(sys1, sys2, dt=1)
363363

364364

365365
class TestEnsureTf:

control/tests/bspline_test.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -182,40 +182,40 @@ def test_kinematic_car_multivar():
182182
def test_bspline_errors():
183183
# Breakpoints must be a 1D array, in increasing order
184184
with pytest.raises(NotImplementedError, match="not yet supported"):
185-
basis = fs.BSplineFamily([[0, 1, 3], [0, 2, 3]], [3, 3])
185+
fs.BSplineFamily([[0, 1, 3], [0, 2, 3]], [3, 3])
186186

187187
with pytest.raises(ValueError,
188188
match="breakpoints must be convertable to a 1D array"):
189-
basis = fs.BSplineFamily([[[0, 1], [0, 1]], [[0, 1], [0, 1]]], [3, 3])
189+
fs.BSplineFamily([[[0, 1], [0, 1]], [[0, 1], [0, 1]]], [3, 3])
190190

191191
with pytest.raises(ValueError, match="must have at least 2 values"):
192-
basis = fs.BSplineFamily([10], 2)
192+
fs.BSplineFamily([10], 2)
193193

194194
with pytest.raises(ValueError, match="must be strictly increasing"):
195-
basis = fs.BSplineFamily([1, 3, 2], 2)
195+
fs.BSplineFamily([1, 3, 2], 2)
196196

197197
# Smoothness can't be more than dimension of splines
198-
basis = fs.BSplineFamily([0, 1], 4, 3) # OK
198+
fs.BSplineFamily([0, 1], 4, 3) # OK
199199
with pytest.raises(ValueError, match="degree must be greater"):
200-
basis = fs.BSplineFamily([0, 1], 4, 4) # not OK
200+
fs.BSplineFamily([0, 1], 4, 4) # not OK
201201

202202
# nvars must be an integer
203203
with pytest.raises(TypeError, match="vars must be an integer"):
204-
basis = fs.BSplineFamily([0, 1], 4, 3, vars=['x1', 'x2'])
204+
fs.BSplineFamily([0, 1], 4, 3, vars=['x1', 'x2'])
205205

206206
# degree, smoothness must match nvars
207207
with pytest.raises(ValueError, match="length of 'degree' does not match"):
208-
basis = fs.BSplineFamily([0, 1], [4, 4, 4], 3, vars=2)
208+
fs.BSplineFamily([0, 1], [4, 4, 4], 3, vars=2)
209209

210210
# degree, smoothness must be list of ints
211-
basis = fs.BSplineFamily([0, 1], [4, 4], 3, vars=2) # OK
211+
fs.BSplineFamily([0, 1], [4, 4], 3, vars=2) # OK
212212
with pytest.raises(ValueError, match="could not parse 'degree'"):
213-
basis = fs.BSplineFamily([0, 1], [4, '4'], 3, vars=2)
213+
fs.BSplineFamily([0, 1], [4, '4'], 3, vars=2)
214214

215215
# degree must be strictly positive
216216
with pytest.raises(ValueError, match="'degree'; must be at least 1"):
217-
basis = fs.BSplineFamily([0, 1], 0, 1)
217+
fs.BSplineFamily([0, 1], 0, 1)
218218

219219
# smoothness must be non-negative
220220
with pytest.raises(ValueError, match="'smoothness'; must be at least 0"):
221-
basis = fs.BSplineFamily([0, 1], 2, -1)
221+
fs.BSplineFamily([0, 1], 2, -1)

control/tests/ctrlplot_test.py

Lines changed: 2 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def setup_plot_arguments(resp_fcn, plot_fcn, compute_time_response=True):
7474
case ct.gangof4_response, _:
7575
args1 = (sys1, sys1c)
7676
args2 = (sys2, sys1c)
77-
default_labels = ["P=sys[1]", "P=sys[2]"]
7877

7978
case ct.frequency_response, ct.nichols_plot:
8079
args1 = (sys1, None) # to allow *fmt in linestyle test
@@ -234,10 +233,10 @@ def test_plot_ax_processing(resp_fcn, plot_fcn):
234233
# Call the plotting function, passing the axes
235234
if resp_fcn is not None:
236235
resp = resp_fcn(*args, **kwargs, **resp_kwargs)
237-
cplt4 = resp.plot(**kwargs, **meth_kwargs, ax=ax)
236+
resp.plot(**kwargs, **meth_kwargs, ax=ax)
238237
else:
239238
# No response function available; just plot the data
240-
cplt4 = plot_fcn(*args, **kwargs, **plot_kwargs, ax=ax)
239+
plot_fcn(*args, **kwargs, **plot_kwargs, ax=ax)
241240

242241
# Check to make sure original settings did not change
243242
assert fig._suptitle.get_text() == title
@@ -326,19 +325,9 @@ def test_plot_label_processing(resp_fcn, plot_fcn):
326325
@pytest.mark.parametrize("resp_fcn, plot_fcn", resp_plot_fcns)
327326
@pytest.mark.usefixtures('mplcleanup')
328327
def test_plot_linestyle_processing(resp_fcn, plot_fcn):
329-
# Create some systems to use
330-
sys1 = ct.rss(2, 1, 1, strictly_proper=True, name="sys[1]")
331-
sys1c = ct.rss(4, 1, 1, strictly_proper=True, name="sys[1]_C")
332-
sys2 = ct.rss(4, 1, 1, strictly_proper=True, name="sys[2]")
333-
334328
# Set up arguments
335329
args1, args2, _, kwargs, meth_kwargs, plot_kwargs, resp_kwargs = \
336330
setup_plot_arguments(resp_fcn, plot_fcn)
337-
default_labels = ["sys[1]", "sys[2]"]
338-
expected_labels = ["sys1_", "sys2_"]
339-
match resp_fcn, plot_fcn:
340-
case ct.gangof4_response, _:
341-
default_labels = ["P=sys[1]", "P=sys[2]"]
342331

343332
# Set line color
344333
cplt1 = plot_fcn(*args1, **kwargs, **plot_kwargs, color='r')
@@ -486,16 +475,10 @@ def test_mimo_plot_legend_processing(resp_fcn, plot_fcn):
486475
@pytest.mark.parametrize("resp_fcn, plot_fcn", resp_plot_fcns)
487476
@pytest.mark.usefixtures('mplcleanup')
488477
def test_plot_title_processing(resp_fcn, plot_fcn):
489-
# Create some systems to use
490-
sys1 = ct.rss(2, 1, 1, strictly_proper=True, name="sys[1]")
491-
sys1c = ct.rss(4, 1, 1, strictly_proper=True, name="sys[1]_C")
492-
sys2 = ct.rss(2, 1, 1, strictly_proper=True, name="sys[2]")
493-
494478
# Set up arguments
495479
args1, args2, argsc, kwargs, meth_kwargs, plot_kwargs, resp_kwargs = \
496480
setup_plot_arguments(resp_fcn, plot_fcn)
497481
default_title = "sys[1], sys[2]"
498-
expected_title = "sys1_, sys2_"
499482
match resp_fcn, plot_fcn:
500483
case ct.gangof4_response, _:
501484
default_title = "P=sys[1], C=sys[1]_C, P=sys[2], C=sys[1]_C"
@@ -582,11 +565,9 @@ def test_plot_title_processing(resp_fcn, plot_fcn):
582565
@pytest.mark.usefixtures('mplcleanup')
583566
def test_tickmark_label_processing(plot_fcn):
584567
# Generate the response that we will use for plotting
585-
top_row, bot_row = 0, -1
586568
match plot_fcn:
587569
case ct.bode_plot:
588570
resp = ct.frequency_response(ct.rss(4, 2, 2))
589-
top_row = 1
590571
case ct.time_response_plot:
591572
resp = ct.step_response(ct.rss(4, 2, 2))
592573
case ct.gangof4_plot:
@@ -620,20 +601,9 @@ def test_tickmark_label_processing(plot_fcn):
620601
@pytest.mark.parametrize("resp_fcn, plot_fcn", resp_plot_fcns)
621602
@pytest.mark.usefixtures('mplcleanup', 'editsdefaults')
622603
def test_rcParams(resp_fcn, plot_fcn):
623-
# Create some systems to use
624-
sys1 = ct.rss(2, 1, 1, strictly_proper=True, name="sys[1]")
625-
sys1c = ct.rss(4, 1, 1, strictly_proper=True, name="sys[1]_C")
626-
sys2 = ct.rss(2, 1, 1, strictly_proper=True, name="sys[2]")
627-
628604
# Set up arguments
629605
args1, args2, argsc, kwargs, meth_kwargs, plot_kwargs, resp_kwargs = \
630606
setup_plot_arguments(resp_fcn, plot_fcn)
631-
default_title = "sys[1], sys[2]"
632-
expected_title = "sys1_, sys2_"
633-
match resp_fcn, plot_fcn:
634-
case ct.gangof4_response, _:
635-
default_title = "P=sys[1], C=sys[1]_C, P=sys[2], C=sys[1]_C"
636-
637607
# Create new set of rcParams
638608
my_rcParams = {}
639609
for key in ct.ctrlplot.rcParams:

control/tests/descfcn_test.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,12 +205,12 @@ def test_describing_function_exceptions():
205205
assert saturation(3) == 2
206206

207207
# Turn off the bias check
208-
bias = ct.describing_function(saturation, 0, zero_check=False)
208+
ct.describing_function(saturation, 0, zero_check=False)
209209

210210
# Function should evaluate to zero at zero amplitude
211211
f = lambda x: x + 0.5
212212
with pytest.raises(ValueError, match="must evaluate to zero"):
213-
bias = ct.describing_function(f, 0, zero_check=True)
213+
ct.describing_function(f, 0, zero_check=True)
214214

215215
# Evaluate at a negative amplitude
216216
with pytest.raises(ValueError, match="cannot evaluate"):
@@ -236,4 +236,4 @@ def test_describing_function_exceptions():
236236
# Describing function plot for non-describing function object
237237
resp = ct.frequency_response(H_simple)
238238
with pytest.raises(TypeError, match="data must be DescribingFunction"):
239-
cplt = ct.describing_function_plot(resp)
239+
ct.describing_function_plot(resp)

control/tests/discrete_test.py

Lines changed: 60 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -231,116 +231,117 @@ def testisctime(self, tsys):
231231

232232
def testAddition(self, tsys):
233233
# State space addition
234-
sys = tsys.siso_ss1 + tsys.siso_ss1d
235-
sys = tsys.siso_ss1 + tsys.siso_ss1c
236-
sys = tsys.siso_ss1c + tsys.siso_ss1
237-
sys = tsys.siso_ss1d + tsys.siso_ss1
238-
sys = tsys.siso_ss1c + tsys.siso_ss1c
239-
sys = tsys.siso_ss1d + tsys.siso_ss1d
240-
sys = tsys.siso_ss3d + tsys.siso_ss3d
241-
sys = tsys.siso_ss1d + tsys.siso_ss3d
234+
_sys = tsys.siso_ss1 + tsys.siso_ss1d
235+
_sys = tsys.siso_ss1 + tsys.siso_ss1c
236+
_sys = tsys.siso_ss1c + tsys.siso_ss1
237+
_sys = tsys.siso_ss1d + tsys.siso_ss1
238+
_sys = tsys.siso_ss1c + tsys.siso_ss1c
239+
_sys = tsys.siso_ss1d + tsys.siso_ss1d
240+
_sys = tsys.siso_ss3d + tsys.siso_ss3d
241+
_sys = tsys.siso_ss1d + tsys.siso_ss3d
242242

243243
with pytest.raises(ValueError):
244244
StateSpace.__add__(tsys.mimo_ss1c, tsys.mimo_ss1d)
245245
with pytest.raises(ValueError):
246246
StateSpace.__add__(tsys.mimo_ss1d, tsys.mimo_ss2d)
247247

248248
# Transfer function addition
249-
sys = tsys.siso_tf1 + tsys.siso_tf1d
250-
sys = tsys.siso_tf1 + tsys.siso_tf1c
251-
sys = tsys.siso_tf1c + tsys.siso_tf1
252-
sys = tsys.siso_tf1d + tsys.siso_tf1
253-
sys = tsys.siso_tf1c + tsys.siso_tf1c
254-
sys = tsys.siso_tf1d + tsys.siso_tf1d
255-
sys = tsys.siso_tf2d + tsys.siso_tf2d
256-
sys = tsys.siso_tf1d + tsys.siso_tf3d
249+
_sys = tsys.siso_tf1 + tsys.siso_tf1d
250+
_sys = tsys.siso_tf1 + tsys.siso_tf1c
251+
_sys = tsys.siso_tf1c + tsys.siso_tf1
252+
_sys = tsys.siso_tf1d + tsys.siso_tf1
253+
_sys = tsys.siso_tf1c + tsys.siso_tf1c
254+
_sys = tsys.siso_tf1d + tsys.siso_tf1d
255+
_sys = tsys.siso_tf2d + tsys.siso_tf2d
256+
_sys = tsys.siso_tf1d + tsys.siso_tf3d
257257

258258
with pytest.raises(ValueError):
259259
TransferFunction.__add__(tsys.siso_tf1c, tsys.siso_tf1d)
260260
with pytest.raises(ValueError):
261261
TransferFunction.__add__(tsys.siso_tf1d, tsys.siso_tf2d)
262262

263263
# State space + transfer function
264-
sys = tsys.siso_ss1c + tsys.siso_tf1c
265-
sys = tsys.siso_tf1c + tsys.siso_ss1c
266-
sys = tsys.siso_ss1d + tsys.siso_tf1d
267-
sys = tsys.siso_tf1d + tsys.siso_ss1d
264+
_sys = tsys.siso_ss1c + tsys.siso_tf1c
265+
_sys = tsys.siso_tf1c + tsys.siso_ss1c
266+
_sys = tsys.siso_ss1d + tsys.siso_tf1d
267+
_sys = tsys.siso_tf1d + tsys.siso_ss1d
268268
with pytest.raises(ValueError):
269269
TransferFunction.__add__(tsys.siso_tf1c, tsys.siso_ss1d)
270270

271271
def testMultiplication(self, tsys):
272272
# State space multiplication
273-
sys = tsys.siso_ss1 * tsys.siso_ss1d
274-
sys = tsys.siso_ss1 * tsys.siso_ss1c
275-
sys = tsys.siso_ss1c * tsys.siso_ss1
276-
sys = tsys.siso_ss1d * tsys.siso_ss1
277-
sys = tsys.siso_ss1c * tsys.siso_ss1c
278-
sys = tsys.siso_ss1d * tsys.siso_ss1d
279-
sys = tsys.siso_ss1d * tsys.siso_ss3d
273+
_sys = tsys.siso_ss1 * tsys.siso_ss1d
274+
_sys = tsys.siso_ss1 * tsys.siso_ss1c
275+
_sys = tsys.siso_ss1c * tsys.siso_ss1
276+
_sys = tsys.siso_ss1d * tsys.siso_ss1
277+
_sys = tsys.siso_ss1c * tsys.siso_ss1c
278+
_sys = tsys.siso_ss1d * tsys.siso_ss1d
279+
_sys = tsys.siso_ss1d * tsys.siso_ss3d
280280

281281
with pytest.raises(ValueError):
282282
StateSpace.__mul__(tsys.mimo_ss1c, tsys.mimo_ss1d)
283283
with pytest.raises(ValueError):
284284
StateSpace.__mul__(tsys.mimo_ss1d, tsys.mimo_ss2d)
285285

286286
# Transfer function multiplication
287-
sys = tsys.siso_tf1 * tsys.siso_tf1d
288-
sys = tsys.siso_tf1 * tsys.siso_tf1c
289-
sys = tsys.siso_tf1c * tsys.siso_tf1
290-
sys = tsys.siso_tf1d * tsys.siso_tf1
291-
sys = tsys.siso_tf1c * tsys.siso_tf1c
292-
sys = tsys.siso_tf1d * tsys.siso_tf1d
293-
sys = tsys.siso_tf1d * tsys.siso_tf3d
287+
_sys = tsys.siso_tf1 * tsys.siso_tf1d
288+
_sys = tsys.siso_tf1 * tsys.siso_tf1c
289+
_sys = tsys.siso_tf1c * tsys.siso_tf1
290+
_sys = tsys.siso_tf1d * tsys.siso_tf1
291+
_sys = tsys.siso_tf1c * tsys.siso_tf1c
292+
_sys = tsys.siso_tf1d * tsys.siso_tf1d
293+
_sys = tsys.siso_tf1d * tsys.siso_tf3d
294294

295295
with pytest.raises(ValueError):
296296
TransferFunction.__mul__(tsys.siso_tf1c, tsys.siso_tf1d)
297297
with pytest.raises(ValueError):
298298
TransferFunction.__mul__(tsys.siso_tf1d, tsys.siso_tf2d)
299299

300300
# State space * transfer function
301-
sys = tsys.siso_ss1c * tsys.siso_tf1c
302-
sys = tsys.siso_tf1c * tsys.siso_ss1c
303-
sys = tsys.siso_ss1d * tsys.siso_tf1d
304-
sys = tsys.siso_tf1d * tsys.siso_ss1d
301+
_sys = tsys.siso_ss1c * tsys.siso_tf1c
302+
_sys = tsys.siso_tf1c * tsys.siso_ss1c
303+
_sys = tsys.siso_ss1d * tsys.siso_tf1d
304+
_sys = tsys.siso_tf1d * tsys.siso_ss1d
305305
with pytest.raises(ValueError):
306306
TransferFunction.__mul__(tsys.siso_tf1c,
307307
tsys.siso_ss1d)
308308

309309

310310
def testFeedback(self, tsys):
311311
# State space feedback
312-
sys = feedback(tsys.siso_ss1, tsys.siso_ss1d)
313-
sys = feedback(tsys.siso_ss1, tsys.siso_ss1c)
314-
sys = feedback(tsys.siso_ss1c, tsys.siso_ss1)
315-
sys = feedback(tsys.siso_ss1d, tsys.siso_ss1)
316-
sys = feedback(tsys.siso_ss1c, tsys.siso_ss1c)
317-
sys = feedback(tsys.siso_ss1d, tsys.siso_ss1d)
318-
sys = feedback(tsys.siso_ss1d, tsys.siso_ss3d)
312+
_sys = feedback(tsys.siso_ss1, tsys.siso_ss1d)
313+
_sys = feedback(tsys.siso_ss1, tsys.siso_ss1c)
314+
_sys = feedback(tsys.siso_ss1c, tsys.siso_ss1)
315+
_sys = feedback(tsys.siso_ss1d, tsys.siso_ss1)
316+
_sys = feedback(tsys.siso_ss1c, tsys.siso_ss1c)
317+
_sys = feedback(tsys.siso_ss1d, tsys.siso_ss1d)
318+
_sys = feedback(tsys.siso_ss1d, tsys.siso_ss3d)
319319

320320
with pytest.raises(ValueError):
321321
feedback(tsys.mimo_ss1c, tsys.mimo_ss1d)
322322
with pytest.raises(ValueError):
323323
feedback(tsys.mimo_ss1d, tsys.mimo_ss2d)
324324

325325
# Transfer function feedback
326-
sys = feedback(tsys.siso_tf1, tsys.siso_tf1d)
327-
sys = feedback(tsys.siso_tf1, tsys.siso_tf1c)
328-
sys = feedback(tsys.siso_tf1c, tsys.siso_tf1)
329-
sys = feedback(tsys.siso_tf1d, tsys.siso_tf1)
330-
sys = feedback(tsys.siso_tf1c, tsys.siso_tf1c)
331-
sys = feedback(tsys.siso_tf1d, tsys.siso_tf1d)
332-
sys = feedback(tsys.siso_tf1d, tsys.siso_tf3d)
326+
_sys = feedback(tsys.siso_tf1, tsys.siso_tf1d)
327+
_sys = feedback(tsys.siso_tf1, tsys.siso_tf1c)
328+
_sys = feedback(tsys.siso_tf1c, tsys.siso_tf1)
329+
_sys = feedback(tsys.siso_tf1d, tsys.siso_tf1)
330+
_sys = feedback(tsys.siso_tf1c, tsys.siso_tf1c)
331+
_sys = feedback(tsys.siso_tf1d, tsys.siso_tf1d)
332+
_sys = feedback(tsys.siso_tf1d, tsys.siso_tf3d)
333333

334334
with pytest.raises(ValueError):
335335
feedback(tsys.siso_tf1c, tsys.siso_tf1d)
336336
with pytest.raises(ValueError):
337337
feedback(tsys.siso_tf1d, tsys.siso_tf2d)
338338

339339
# State space, transfer function
340-
sys = feedback(tsys.siso_ss1c, tsys.siso_tf1c)
341-
sys = feedback(tsys.siso_tf1c, tsys.siso_ss1c)
342-
sys = feedback(tsys.siso_ss1d, tsys.siso_tf1d)
343-
sys = feedback(tsys.siso_tf1d, tsys.siso_ss1d)
340+
_sys = feedback(tsys.siso_ss1c, tsys.siso_tf1c)
341+
_sys = feedback(tsys.siso_tf1c, tsys.siso_ss1c)
342+
_sys = feedback(tsys.siso_ss1d, tsys.siso_tf1d)
343+
344+
_sys = feedback(tsys.siso_tf1d, tsys.siso_ss1d)
344345
with pytest.raises(ValueError):
345346
feedback(tsys.siso_tf1c, tsys.siso_ss1d)
346347

@@ -416,11 +417,11 @@ def test_sample_system_prewarp_warning(self, tsys, plantname, discretization_typ
416417
wwarp = 1
417418
Ts = 0.1
418419
with pytest.warns(UserWarning, match="prewarp_frequency ignored: incompatible conversion"):
419-
plant_d_warped = plant.sample(Ts, discretization_type, prewarp_frequency=wwarp)
420+
plant.sample(Ts, discretization_type, prewarp_frequency=wwarp)
420421
with pytest.warns(UserWarning, match="prewarp_frequency ignored: incompatible conversion"):
421-
plant_d_warped = sample_system(plant, Ts, discretization_type, prewarp_frequency=wwarp)
422+
sample_system(plant, Ts, discretization_type, prewarp_frequency=wwarp)
422423
with pytest.warns(UserWarning, match="prewarp_frequency ignored: incompatible conversion"):
423-
plant_d_warped = c2d(plant, Ts, discretization_type, prewarp_frequency=wwarp)
424+
c2d(plant, Ts, discretization_type, prewarp_frequency=wwarp)
424425

425426
def test_sample_system_errors(self, tsys):
426427
# Check errors

control/tests/flatsys_test.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -543,7 +543,6 @@ def test_point_to_point_errors(self):
543543
x0 = [1, 0]; u0 = [0]
544544
xf = [0, 0]; uf = [0]
545545
Tf = 10
546-
T = np.linspace(0, Tf, 500)
547546

548547
# Cost function
549548
timepts = np.linspace(0, Tf, 10)
@@ -658,7 +657,6 @@ def test_solve_flat_ocp_errors(self):
658657
x0 = [1, 0]; u0 = [0]
659658
xf = [0, 0]; uf = [0]
660659
Tf = 10
661-
T = np.linspace(0, Tf, 500)
662660

663661
# Cost function
664662
timepts = np.linspace(0, Tf, 10)

0 commit comments

Comments
 (0)