convert_model#
- pharmpy.modeling.convert_model(model, to_format)[source]#
Convert model to other format
Note that the operation is not done inplace.
- Parameters:
model (Model) – Model to convert
to_format ({‘generic’, ‘nlmixr’, ‘nonmem’, ‘rxode’}) – Name of format to convert into. Currently supported ‘generic’, ‘nlmixr’, ‘nonmem’, and ‘rxode’
- Returns:
Model – New model object with new underlying model format
Example
>>> from pharmpy.modeling import load_example_model, convert_model >>> model = load_example_model("pheno") >>> converted_model = convert_model(model, "nlmixr")