Skip to content

Commit

Permalink
Fix typos in ufloat_fromstr docstring examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Cs137 committed Jan 20, 2025
1 parent 61f688f commit 4151820
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Adds:

Fixes:

- fix typos in `ufloat_fromstr` docstring examples (#285)
- fix `readthedocs` configuration so that the build passes (#254)
- adjust `codecov.io` configuration so that minor code coverage changes will not result
in indications that tests are failing. Rather code coverage reports will be purely
Expand Down
12 changes: 6 additions & 6 deletions uncertainties/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -988,13 +988,13 @@ def ufloat_fromstr(representation, tag=None):
Examples:
-----------
>>> x = ufloat_fromsstr("12.58+/-0.23") # = ufloat(12.58, 0.23)
>>> x = ufloat_fromsstr("12.58 ± 0.23") # = ufloat(12.58, 0.23)
>>> x = ufloat_fromsstr("3.85e5 +/- 2.3e4") # = ufloat(3.8e5, 2.3e4)
>>> x = ufloat_fromsstr("(38.5 +/- 2.3)e4") # = ufloat(3.8e5, 2.3e4)
>>> x = ufloat_fromstr("12.58+/-0.23") # = ufloat(12.58, 0.23)
>>> x = ufloat_fromstr("12.58 ± 0.23") # = ufloat(12.58, 0.23)
>>> x = ufloat_fromstr("3.85e5 +/- 2.3e4") # = ufloat(3.8e5, 2.3e4)
>>> x = ufloat_fromstr("(38.5 +/- 2.3)e4") # = ufloat(3.8e5, 2.3e4)
>>> x = ufloat_fromsstr("72.1(2.2)") # = ufloat(72.1, 2.2)
>>> x = ufloat_fromsstr("72.15(4)") # = ufloat(72.15, 0.04)
>>> x = ufloat_fromstr("72.1(2.2)") # = ufloat(72.1, 2.2)
>>> x = ufloat_fromstr("72.15(4)") # = ufloat(72.15, 0.04)
>>> x = ufloat_fromstr("680(41)e-3") # = ufloat(0.68, 0.041)
>>> x = ufloat_fromstr("23.2") # = ufloat(23.2, 0.1)
>>> x = ufloat_fromstr("23.29") # = ufloat(23.29, 0.01)
Expand Down

0 comments on commit 4151820

Please sign in to comment.