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
Instances of theMeasurement class have 4 methods to produce a formatted string: __str__, __repr__, _repr_html_ and _repr_latex_. As far as I understand, all of them should follow the format specifications in ureg.default_formatting, or in measurement.default_formatting in case they differ, in a consistent manner.
However, __str__ and __repr__ ignore the value of measurement.default_format and instead follow what ureg.default_format specifies. On the other hand _repr_html_ and _repr_latex_ follow what it is specified in measurement.default_format (which might or might not be the same than what ureg.default_format specifies).
For Quantity instances the behaviour of the four formatting methods is not consistent, either, but in a different way (#1299).
Current version 0.24.3 measurements do not care about Measurement.default_format directly on the instance, nor the documentation mentions it, so the inconsistency is gone.
Instances of the
Measurement
class have 4 methods to produce a formatted string:__str__
,__repr__
,_repr_html_
and_repr_latex_
. As far as I understand, all of them should follow the format specifications inureg.default_formatting
, or inmeasurement.default_formatting
in case they differ, in a consistent manner.However,
__str__
and__repr__
ignore the value ofmeasurement.default_format
and instead follow whatureg.default_format
specifies. On the other hand_repr_html_
and_repr_latex_
follow what it is specified inmeasurement.default_format
(which might or might not be the same than whatureg.default_format
specifies).For
Quantity
instances the behaviour of the four formatting methods is not consistent, either, but in a different way (#1299).The text was updated successfully, but these errors were encountered: