template.class_template.SymmetryOrbitEQN.from_numpy_array¶
-
SymmetryOrbitEQN.
from_numpy_array
(cdof, *args, **kwargs)¶ Utility to convert from numpy array (orbit_vector) to Orbit instance for scipy wrappers.
- Parameters
- cdofndarray
Vector with (spatiotemporal basis) state values and parameters.
- kwargs :
- parameterstuple
If parameters from another Orbit instance are provided, overwrite the values within the orbit_vector
- parameter_constraintsdict
constraint dictionary, keys are parameter_labels, values are bools
- subclass kwargsdict
If special kwargs are required/desired for Orbit instantiation.
- Returns
- ——-
- Orbit instance :
Orbit instance whose state and parameters are extracted from the input orbit_vector.
Notes
This function is mainly to retrieve output from (scipy) optimization methods and convert it back into Orbit instances. Because constrained parameters are not included in the optimization process, this is not as simple as merely slicing the parameters from the array, as the order of the elements is determined by the constraints. If non-scalar parameters are used, user will need to overwrite the Orbit.from_numpy_array() method.
In order to completely specific the equations in the presence of constraints it is necessary to
Warning
If equation has components for any parameters: However, if the equations of motion have components for the parameters; this will in correctly overwrite the components stored in parameters and this will need an overwrite.