7.1.3. cobrame.io package¶
7.1.3.1. Submodules¶
7.1.3.2. cobrame.io.dict module¶
-
cobrame.io.dict.
get_numeric_from_string
(string)[source]¶ Parameters: string (str) – String representation of numeric expression Returns: Numeric representation of string Return type: float or sympy expression
-
cobrame.io.dict.
get_sympy_expression
(value)[source]¶ Return sympy expression from json string using sympify
mu is assumed to be positive but using sympify does not apply this assumption. The mu symbol produced from sympify is replaced with cobrame’s mu value to ensure the expression can be used in the model.
Parameters: value (str) – String representation of mu containing expression Returns: Numeric representation of string with cobrame’s mu symbol substituted Return type: sympy expression