Skip to content

Commit f48e0cd

Browse files
authored
Merge pull request #154 from scipp/docs-fixes
Docs fixes
2 parents 86252d7 + 936ebec commit f48e0cd

File tree

2 files changed

+16
-14
lines changed

2 files changed

+16
-14
lines changed

src/ess/reduce/ui.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,11 @@ def set_parameter_widget_values(
257257
258258
Example
259259
-------
260-
{
261-
'WavelengthBins': {'start': 1.0, 'stop': 14.0, 'nbins': 500}
262-
}
260+
.. code-block::
261+
262+
set_parameter_widget_values(widget, {
263+
'WavelengthBins': {'start': 1.0, 'stop': 14.0, 'nbins': 500}
264+
})
263265
264266
Parameters
265267
----------

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)