Skip to content

Change units arguments in Model methods to accept unit objects as well as strings #132

@MichaelClerx

Description

@MichaelClerx

To get a number in the units of a specific variable, I now need to do:

    model.get_equation_graph()
    v = model.get_symbol_by_ontology_term(OXMETA, 'membrane_voltage')
    v_meta = model.get_meta_dummy(v)
    unit = v_meta.units
    number = model.add_number(sp.Number(-80), str(unit))

might make more sense if I could use the unit directly? Or would that add some unforseen complication?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions