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
cobrame.io.dict.me_model_from_dict(obj)[source]

Load ME-model from its dictionary representation. This will return a full MEModel object identical to the one saved.

Parameters:obj (dict) – Dictionary representation of ME-model
Returns:Full COBRAme ME-model
Return type:MEModel
cobrame.io.dict.me_model_to_dict(model)[source]

Create dictionary representation of full ME-model

Parameters:model (MEModel) –
Returns:Dictionary representation of ME-model
Return type:dict

7.1.3.3. cobrame.io.json module

7.1.3.4. Module contents