@@ -150,7 +150,7 @@ def load_curvature(self):
150
150
"""Load in curvature values from the ?h.curv file."""
151
151
curv_path = op .join (self .data_path , "surf" , "%s.curv" % self .hemi )
152
152
self .curv = nib .freesurfer .read_morph_data (curv_path )
153
- self .bin_curv = np .array (self .curv > 0 , np . int )
153
+ self .bin_curv = np .array (self .curv > 0 , int )
154
154
155
155
def load_label (self , name ):
156
156
"""Load in a Freesurfer .label file.
@@ -163,7 +163,7 @@ def load_label(self, name):
163
163
"""
164
164
label = nib .freesurfer .read_label (op .join (self .data_path , 'label' ,
165
165
'%s.%s.label' % (self .hemi , name )))
166
- label_array = np .zeros (len (self .x ), np . int )
166
+ label_array = np .zeros (len (self .x ), int )
167
167
label_array [label ] = 1
168
168
try :
169
169
self .labels [name ] = label_array
@@ -513,10 +513,10 @@ def create_color_lut(cmap, n_colors=256, center=None):
513
513
if np .ndim (cmap ) == 2 :
514
514
if cmap .shape [1 ] == 4 :
515
515
# This looks likes a LUT that's ready to go
516
- lut = cmap .astype (np . int )
516
+ lut = cmap .astype (int )
517
517
elif cmap .shape [1 ] == 3 :
518
518
# This looks like a LUT, but it's missing the alpha channel
519
- alpha = np .ones (len (cmap ), np . int ) * 255
519
+ alpha = np .ones (len (cmap ), int ) * 255
520
520
lut = np .c_ [cmap , alpha ]
521
521
522
522
return lut
@@ -548,7 +548,7 @@ def create_color_lut(cmap, n_colors=256, center=None):
548
548
raise ValueError ("Input %r was not valid for making a lut" % cmap )
549
549
550
550
# Convert from a matplotlib colormap to a lut array
551
- lut = (cmap (np .linspace (0 , 1 , n_colors )) * 255 ).astype (np . int )
551
+ lut = (cmap (np .linspace (0 , 1 , n_colors )) * 255 ).astype (int )
552
552
553
553
return lut
554
554
0 commit comments