Skip to content

Commit 3cca41a

Browse files
committed
[CC] Improve readability in test_ICEM_2020
1 parent 7bc5f50 commit 3cca41a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

Tests/Plot/test_ICEM_2020.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -716,16 +716,14 @@ def harm2(output):
716716
out2 = [pm["output"], pm["fitness"]]
717717

718718
# Rename machine to modify the title
719-
out1[
720-
0
721-
].simu.machine.name = "Machine that maximizes the average torque ({:.3f} Nm)".format(
719+
name1 = "Machine that maximizes the average torque ({:.3f} Nm)".format(
722720
abs(out1[1][0])
723721
)
724-
out2[
725-
0
726-
].simu.machine.name = "Machine that minimizes the first torque harmonic ({:.4f}Nm)".format(
722+
out1[0].simu.machine.name = name1
723+
name2 = "Machine that minimizes the first torque harmonic ({:.4f}Nm)".format(
727724
abs(out1[1][1])
728725
)
726+
out2[0].simu.machine.name = name2
729727

730728
# plot the machine
731729
out1[0].simu.machine.plot()

0 commit comments

Comments
 (0)