Skip to content

Commit abdf9f8

Browse files
authored
Typo, combine_uncertaintes -> combine_uncertainties.
1 parent e2653de commit abdf9f8

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

scinum/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,11 +568,11 @@ def set_uncertainty(
568568
uncertainties = self.__class__.uncertainties.fparse(self, {name: value})
569569
self._uncertainties.update(uncertainties)
570570

571-
def combine_uncertaintes(
571+
def combine_uncertainties(
572572
self,
573573
combine: UncertaintyFlag | str | dict[str, Sequence[str]] = UncertaintyFlag.ALL,
574574
) -> Number:
575-
""" combine_uncertaintes(combine_uncs=ALL)
575+
""" combine_uncertainties(combine_uncs=ALL)
576576
Returns a copy of this number with certain uncertainties combined. *combine* can be a
577577
dictionary of keys mapping to strings denoting uncertainties that should be combined with
578578
keys refering to new names of the combined uncertainties.
@@ -654,7 +654,7 @@ def str(
654654
of NumPy objects, *kwargs* are passed to `numpy.array2string
655655
<https://docs.scipy.org/doc/numpy/reference/generated/numpy.array2string.html>`_.
656656
657-
When *combine_uncs* is set, uncertainties are reduced via :py:meth:`combine_uncertaintes`.
657+
When *combine_uncs* is set, uncertainties are reduced via :py:meth:`combine_uncertainties`.
658658
When *unit* is set, it is appended to the end of the string. When *scientific* is *True*,
659659
all values are represented by their scientific notation. When *scientific* is *False* and
660660
*si* is *True*, the appropriate SI prefix is used.
@@ -701,7 +701,7 @@ def str(
701701

702702
# when uncertainties should be combined, create a new instance and forward to its formatting
703703
if combine_uncs:
704-
return self.combine_uncertaintes(combine=combine_uncs).str(
704+
return self.combine_uncertainties(combine=combine_uncs).str(
705705
format=format,
706706
unit=unit,
707707
scientific=scientific,

tests/test_number.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -389,16 +389,16 @@ def test_uncertainty_propagation(self) -> None:
389389
self.assertEqual(num(UP), 0)
390390
self.assertEqual(num(DOWN), 0)
391391

392-
def test_combine_uncertaintes(self) -> None:
392+
def test_combine_uncertainties(self) -> None:
393393
n = Number(8848, {"stat": (30, 20), "syst": 20, "other": 10})
394394

395-
n1 = n.combine_uncertaintes()
395+
n1 = n.combine_uncertainties()
396396
self.assertEqual(n1.str(format=3), "8848.0 +37.4-30.0")
397397

398-
n2 = n.combine_uncertaintes({"x": ["stat", "syst"]})
398+
n2 = n.combine_uncertainties({"x": ["stat", "syst"]})
399399
self.assertEqual(n2.str(format=3), "8848.0 +36.1-28.3 (x) +-10.0 (other)")
400400

401-
n3 = n.combine_uncertaintes(OrderedDict([("x", ["stat", "syst"]), ("y", "all")]))
401+
n3 = n.combine_uncertainties(OrderedDict([("x", ["stat", "syst"]), ("y", "all")]))
402402
self.assertEqual(n3.str(format=3), "8848.0 +36.1-28.3 (x) +37.4-30.0 (y)")
403403

404404
def test_uncertainty_format(self) -> None:

0 commit comments

Comments
 (0)