is_real#

pharmpy.modeling.is_real(model, expr)[source]#

Determine if an expression is real valued given constraints of a model

Parameters:
  • model (Model) – Pharmpy model

  • expr (str or expression) – Expression to test

Returns:

bool or None – True if expression is real, False if not and None if unknown

Example

>>> from pharmpy.modeling import load_example_model, is_real
>>> import sympy
>>> model = load_example_model("pheno")
>>> is_real(model, "CL")
True