Skip to content

Commit e8bebfa

Browse files
committed
BF: fix various Windows errors
We assume things like uint == uintp type, and intp == long, which are not true on Windows 64 bit. [skip ci]
1 parent f0f35ad commit e8bebfa

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

nipy/algorithms/group/parcel_analysis.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def __init__(self, con_imgs, parcel_img, parcel_info=None,
251251
# load the parcellation and resample it at the appropriate
252252
# resolution
253253
self.reference = parcel_img.reference
254-
self.parcel_full_res = parcel_img.get_data().astype('uint').squeeze()
254+
self.parcel_full_res = parcel_img.get_data().astype('uintp').squeeze()
255255
self.affine_full_res = xyz_affine(parcel_img)
256256
parcel_img = make_xyz_image(self.parcel_full_res,
257257
self.affine_full_res,
@@ -261,7 +261,7 @@ def __init__(self, con_imgs, parcel_img, parcel_info=None,
261261
reference=(self.con_imgs[0].shape,
262262
self.affine),
263263
interp_order=0)
264-
self.parcel = parcel_img_rsp.get_data().astype('uint').squeeze()
264+
self.parcel = parcel_img_rsp.get_data().astype('uintp').squeeze()
265265
if self.msk is None:
266266
self.msk = self.parcel > 0
267267

nipy/algorithms/registration/histogram_registration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from .similarity_measures import similarity_measures as _sms
2020
from ._registration import _joint_histogram
2121

22-
MAX_INT = np.iinfo(np.intp).max
22+
MAX_INT = np.iinfo(np.int).max
2323

2424
# Module globals
2525
VERBOSE = True # enables online print statements

0 commit comments

Comments
 (0)