utils.solver.build_state_from_history

utils.solver.build_state_from_history(time, history, state_variables_names)

Build a structured state array from a solved trajectory.

Parameters

time : array - like

Time axis of the solution.

history : (array - like, shape(n_times, n_vars))

Solution array.

state_variables_names : list of str

Names of state variables used to build a structured dtype.

Returns

state : structured ndarray or ndarray

Structured array with named fields if state_variables_names is non-empty; otherwise the raw history array.