Skip to content

Commit 936ebec

Browse files
committed
Improve docs of UncertaintyBroadcastMode
Sphinx used to show UncertaintyBroadcastMode twice, as a class and as a module attribute. With the new implementation, it only shows a class.
1 parent fc79476 commit 936ebec

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

src/ess/reduce/uncertainty.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
helper function.
1414
"""
1515

16-
from enum import Enum
16+
from enum import Enum, auto
1717
from typing import TypeVar, overload
1818

1919
import numpy as np
@@ -23,18 +23,18 @@
2323
T = TypeVar("T", bound=sc.Variable | sc.DataArray)
2424

2525

26-
UncertaintyBroadcastMode = Enum(
27-
'UncertaintyBroadcastMode', ['drop', 'upper_bound', 'fail']
28-
)
29-
"""
30-
Mode for broadcasting uncertainties.
26+
class UncertaintyBroadcastMode(Enum):
27+
"""Mode for broadcasting uncertainties.
3128
32-
- `drop`: Drop variances if the data is broadcasted.
33-
- `upper_bound`: Compute an upper bound for the variances.
34-
- `fail`: Do not broadcast, simply return the input data.
29+
See https://doi.org/10.3233/JNR-220049 for context.
30+
"""
3531

36-
See https://doi.org/10.3233/JNR-220049 for context.
37-
"""
32+
drop = auto()
33+
"""Drop variances if the data is broadcast."""
34+
upper_bound = auto()
35+
"""Compute an upper bound for the variances."""
36+
fail = auto()
37+
"""Do not broadcast, simply return the input data."""
3838

3939

4040
@overload

0 commit comments

Comments
 (0)