Skip to content

Commit 768f106

Browse files
jhlegarretaeffigies
andcommitted
STYLE: Prefer specifying b-values as integer types
Prefer specifying b-values as integer types. Increases consistency with the rest of the code, and avoids using `numbers.Number` which seems to be problematic for type checking with `mypy`: python/mypy#3186 Co-authored-by: Chris Markiewicz <[email protected]>
1 parent de4d18b commit 768f106

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/nifreeze/model/dmri.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
# https://www.nipreps.org/community/licensing/
2222
#
2323

24-
import numbers
2524
from importlib import import_module
2625

2726
import numpy as np
@@ -179,8 +178,8 @@ def __init__(
179178
self,
180179
dataset: DWI,
181180
stat: str = "median",
182-
th_low: numbers.Number = 100,
183-
th_high: numbers.Number = 100,
181+
th_low: int = 100,
182+
th_high: int = 100,
184183
detrend: bool = False,
185184
**kwargs,
186185
):
@@ -189,10 +188,10 @@ def __init__(
189188
190189
Parameters
191190
----------
192-
th_low : :obj:`numbers.Number`
191+
th_low : :obj:`int`
193192
A lower bound for the b-value corresponding to the diffusion weighted images
194193
that will be averaged.
195-
th_high : :obj:`numbers.Number`
194+
th_high : :obj:`int`
196195
An upper bound for the b-value corresponding to the diffusion weighted images
197196
that will be averaged.
198197
detrend : :obj:`bool`

0 commit comments

Comments
 (0)