Skip to content

Commit cd93c5b

Browse files
committed
BF: use safe Python 2 / 3 check for number
Windows was barfing on long type at this check. [skip ci]
1 parent e8bebfa commit cd93c5b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

nipy/algorithms/segmentation/tests/test_segmentation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
"""
33
from __future__ import absolute_import
44

5+
from numbers import Number
6+
57
import numpy as np
68

79
from nose.tools import assert_equal, assert_almost_equal
@@ -20,8 +22,8 @@
2022

2123

2224
def _check_dims(x, ndim, shape):
23-
if isinstance(shape, int):
24-
shape = (shape, )
25+
if isinstance(shape, Number):
26+
shape = (shape,)
2527
for i in range(ndim):
2628
assert_equal(x.shape[i], shape[i])
2729

0 commit comments

Comments
 (0)