Skip to content

Commit 4bddb5a

Browse files
committed
STYLE: Prefer building an array with None to fill S0
Prefer building an array with `None` to fill `S0` if `S0` is `None` instead of a list to increase consistency.
1 parent 768f106 commit 4bddb5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/nifreeze/model/dmri.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ def fit_predict(self, index: int, **kwargs):
141141
if n_models == 1:
142142
predicted, _ = _exec_predict(self._model, **(kwargs | {"gtab": gradient, "S0": S0}))
143143
else:
144-
S0 = np.array_split(S0, n_models) if S0 is not None else [None] * n_models
144+
S0 = np.array_split(S0, n_models) if S0 is not None else np.full(n_models, None)
145145

146146
predicted = [None] * n_models
147147

0 commit comments

Comments
 (0)