You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scale/offset silently truncate when their length does not match the value #8450
in _scale_raw_value, _offset_raw_value, _unoffset_value and _unscale_value in src/qcodes/parameters/parameter_base.py.
Since zip is not strict, a length mismatch is silently truncated. Setting a parameter with scale = [2, 4] to [10, 20, 30] silently drops the third element rather than telling the user that the scale does not match the value.
We should decide whether to use zip(..., strict=True) (or an explicit length check raising a clear ValueError) so that a mismatch is reported instead of silently producing a shorter value. This is a behaviour change for anyone relying on the truncation, so it needs a breaking-change newsfragment.
Activity
Raise if scale or offset does not match the length of the value
Scale and offset sequences element wise when setting a parameter
Raise if scale or offset does not match the length of the value