-
Notifications
You must be signed in to change notification settings - Fork 2
Closed
Labels
[area] Parameters and DescriptorsAnything related to Parameters or DescriptorsAnything related to Parameters or Descriptors[priority] highShould be prioritized soonShould be prioritized soon[scope] bugBug report or fix (major.minor.PATCH)Bug report or fix (major.minor.PATCH)
Description
PROBLEM:
- UnitError when accessing Parameter.full_value after interface assignment
- Error message: "Expected unit Å, got dimensionless"
- Occurred when accessing: any parameter in any library after redoing bindings of the interface
- Also affected arithmetic operations between parameters
ROOT CAUSE:
- When model.interface = calculator is assigned, generate_bindings() sets up callbacks
- The callback function returns raw numpy.float64 values (dimensionless)
- Parameter.full_value property tries to compare dimensionless callback value with scipp.Variable that has units
- This comparison: scalar != self._scalar triggered UnitError
Metadata
Metadata
Assignees
Labels
[area] Parameters and DescriptorsAnything related to Parameters or DescriptorsAnything related to Parameters or Descriptors[priority] highShould be prioritized soonShould be prioritized soon[scope] bugBug report or fix (major.minor.PATCH)Bug report or fix (major.minor.PATCH)