csnlp.core.data.cs2array#
- csnlp.core.data.cs2array(x)[source]#
Converts the symbolic variable
xto a numpy array of scalar symbolic variables (seearray2csfor the opposite functionality).Inspired by the implementation in MPCTools.
- Parameters:
- xcasadi.SX or MX
A symbolic variable (with multiple entries).
- Returns:
- numpy array of casadi.SX or MX
The array containing the symbolic variable scalars.
- Return type:
Examples using csnlp.core.data.cs2array#
Comparison of CasADi’s and csnlp’s sensitivity computations
Comparison of CasADi's and csnlp's sensitivity computations