Skip to content

Commit

Permalink
Merge pull request #53 from nipreps/fix/lazy-load
Browse files Browse the repository at this point in the history
FIX: Move delayed import to top of file
  • Loading branch information
oesteban authored Jan 17, 2025
2 parents 1a79d77 + bd3ae7c commit 7f1b52b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/nifreeze/model/dmri.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
# https://www.nipreps.org/community/licensing/
#

from importlib import import_module

import numpy as np
from joblib import Parallel, delayed

Expand Down Expand Up @@ -121,8 +123,6 @@ def __init__(self, gtab, S0=None, b_max=None, **kwargs):
# DIPY models (or one with a fully-compliant interface)
model_str = getattr(self, "_model_class", None)
if model_str:
from importlib import import_module

module_name, class_name = model_str.rsplit(".", 1)
self._model = getattr(
import_module(module_name),
Expand Down

0 comments on commit 7f1b52b

Please sign in to comment.