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
yields: TestVariable = 630.000000000000. This is due to the 15 being interpreted as number of significant figures. This is confusing as one might expect to get back TestVariable = 630 ± 15 as is the case for
wiz.res("Test variable", 630, 15.0)
We should somehow circumvent the first behavior, e.g. only allow passing in sigfigs via a named keyword, e.g. sigfigs=15. Maybe this can be achieved with plum somehow. It would also be great to completely disallow the mentioned usage but I'm not sure one can prevent users from not passing in an argument as keyword argument.
The text was updated successfully, but these errors were encountered:
Splines
changed the title
Improve API to avoid confusion with sigfigs when passing in an integer
Sigfigs vs. uncertainty: integer interpretation is problematic
Mar 28, 2024
Splines
changed the title
Sigfigs vs. uncertainty: integer interpretation is problematic
Sigfigs vs. uncertainty: integer interpretation is confusing
Mar 28, 2024
Use Unit as keyword argument, then we don't have the problem with the strings type anymore that lead to difficulties with multiple dispatch.
Note that
wiz.res("a", 3.14, "\m")
will fail as "\m" will be interpreted as uncertainty. (For this case, we should have a really good error message.)
Therefore, in the docs, we should only use unit=. Advanced users might omit this in the case where an uncertainty is specified: wiz.res("a", 3.14, 0.2, "\m"), but we won't promote that use case in the docs.
Currently
yields:
TestVariable = 630.000000000000
. This is due to the15
being interpreted as number of significant figures. This is confusing as one might expect to get backTestVariable = 630 ± 15
as is the case forWe should somehow circumvent the first behavior, e.g. only allow passing in sigfigs via a named keyword, e.g.
sigfigs=15
. Maybe this can be achieved with plum somehow. It would also be great to completely disallow the mentioned usage but I'm not sure one can prevent users from not passing in an argument as keyword argument.The text was updated successfully, but these errors were encountered: