from brian2.equations.unitcheck import check_units_statements)
Check the units for a series of statements. Setting a model variable has to use the correct unit. For newly introduced temporary variables, the unit is determined and used to check the following statements to ensure consistency.
code : str
The statements as a (multi-line) string
variables : dict of
The information about all variables used in
Constantobjects for external variables)
In case on of the identifiers cannot be resolved.
If an unit mismatch occurs during the evaluation.