From 7fe5fbab2c4453b8575716e1ad1ec158100b185e Mon Sep 17 00:00:00 2001 From: EmmaRenauld Date: Wed, 1 Mar 2023 15:27:47 -0500 Subject: [PATCH] Fix nibabel use with python 3.10 --- scilpy/tracking/tracker.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scilpy/tracking/tracker.py b/scilpy/tracking/tracker.py index 55540d959..67d25b9b0 100644 --- a/scilpy/tracking/tracker.py +++ b/scilpy/tracking/tracker.py @@ -8,7 +8,7 @@ from time import perf_counter from typing import Union -import nibabel as nib +from nibabel.tmpdirs import InTemporaryDirectory import numpy as np from dipy.data import get_sphere @@ -133,7 +133,7 @@ def track(self): else: # Each process will use get_streamlines_at_seeds chunk_ids = np.arange(self.nbr_processes) - with nib.tmpdirs.InTemporaryDirectory() as tmpdir: + with InTemporaryDirectory() as tmpdir: pool = self._prepare_multiprocessing_pool(tmpdir)