Solver output should be a 1D numpy array
Currently it's a 2D array, because we cast DM directly to np.array, without flattening after. In CasADi, it's a column-vector, which is why it becomes a 2D array. NumPy does not make this distinction though, so it should just be a flat 1D array.
There are still a lot of np.array() casts and ravel() (e.g. in extract_states), which can be removed when we do this conversion straight away.