If we define a new variable based on other variables, we want to be able to prescribe the desired units rather than taking the base units derived from the embedded expression. Example:
class local_definition(Variable):
"""Local definition."""
unit = joule
class local_variable(Variable):
"""Local variable."""
unit = kilogram * meter ** 2 / second ** 2
default = 2
expr = 1.5 * local_variable
With the current PR, local_definition.definition.unit == joule instead of kilogram * meter ** 2 / second ** 2
If we define a new variable based on other variables, we want to be able to prescribe the desired units rather than taking the base units derived from the embedded expression. Example:
With the current PR,
local_definition.definition.unit == joule
instead ofkilogram * meter ** 2 / second ** 2