Skip to content

Commit

Permalink
CI: Use recent Python image to build packages
Browse files Browse the repository at this point in the history
Similarly to nipreps/fmriprep#1790, we are changing to the Python
3.7+ docker image to test and deploy the Pypi package since twine has
stopped support for python <3.6 since their latest relase 2.0.
  • Loading branch information
oesteban committed Sep 25, 2019
1 parent 26114af commit a592a85
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions qc/anatomical.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,9 +194,6 @@
import scipy.ndimage as nd
from scipy.stats import kurtosis # pylint: disable=E0611

from io import open # pylint: disable=W0622
from builtins import zip, range # pylint: disable=W0622
from six import string_types

DIETRICH_FACTOR = 1.0 / sqrt(2 / (4 - pi))
FSL_FAST_LABELS = {'csf': 1, 'gm': 2, 'wm': 3, 'bg': 0}
Expand Down Expand Up @@ -621,7 +618,7 @@ def _prepare_mask(mask, label, erode=True):
fgmask = mask.copy()

if np.issubdtype(fgmask.dtype, np.integer):
if isinstance(label, string_types):
if isinstance(label, (str, bytes)):
label = FSL_FAST_LABELS[label]

fgmask[fgmask != label] = 0
Expand Down

0 comments on commit a592a85

Please sign in to comment.