x-axis solution array
Summary
The x-axis used for a particular action is currently returned as a tuple of axes. You can use sol.x[0]
for example for plotting. Using sol.x
though requires transposing and it seems some users (and myself) have run into this annoyance.
import finesse
model = finesse.script.parse("l l1")
sol = model.run("xaxis(l1.P, lin, 0, 1, 10)")
sol.x, np.transpose(sol.x)
((array([0. , 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1. ]),),
array([[0. ],
[0.1],
[0.2],
[0.3],
[0.4],
[0.5],
[0.6],
[0.7],
[0.8],
[0.9],
[1. ]]))
I would suggest we make sol.x
a single array when xaxis is used, then an array when xNaxis is used. This would mean sol.x1, etc would not be required.