-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
[priority] highShould be prioritized soonShould be prioritized soon[scope] bugBug report or fix (major.minor.PATCH)Bug report or fix (major.minor.PATCH)
Description
from easyscience.variable import DescriptorNumber, Parameter
angstrom = DescriptorNumber("angstrom", 1e-10, unit="m")
jump_length = Parameter(
name="jump_length",
value=float(1.0),
fixed=False,
unit="angstrom",
)
# expression = "1/angstrom * jump_length"
expression = "jump_length / angstrom"
map = {
"jump_length": jump_length,
"angstrom": angstrom,
}
a = Parameter(name='a',value=1.0)
a.make_dependent_on(
dependency_expression=expression,
dependency_map=map,
)
The above code produces this error

but using expression = "1/angstrom * jump_length" , which is the same math, does not lead to this error.
Copilot
Metadata
Metadata
Labels
[priority] highShould be prioritized soonShould be prioritized soon[scope] bugBug report or fix (major.minor.PATCH)Bug report or fix (major.minor.PATCH)