@@ -49,7 +49,7 @@ def _fread3_many(fobj, n):
4949 An array of 3 byte int
5050 """
5151 b1 , b2 , b3 = np .fromfile (fobj , ">u1" , 3 * n ).reshape (- 1 ,
52- 3 ).astype (np . int ).T
52+ 3 ).astype (int ).T
5353 return (b1 << 16 ) + (b2 << 8 ) + b3
5454
5555
@@ -148,14 +148,14 @@ def read_geometry(filepath, read_metadata=False, read_stamp=False):
148148 nvert = _fread3 (fobj )
149149 nquad = _fread3 (fobj )
150150 (fmt , div ) = (">i2" , 100. ) if magic == QUAD_MAGIC else (">f4" , 1. )
151- coords = np .fromfile (fobj , fmt , nvert * 3 ).astype (np .float ) / div
151+ coords = np .fromfile (fobj , fmt , nvert * 3 ).astype (np .float64 ) / div
152152 coords = coords .reshape (- 1 , 3 )
153153 quads = _fread3_many (fobj , nquad * 4 )
154154 quads = quads .reshape (nquad , 4 )
155155 #
156156 # Face splitting follows
157157 #
158- faces = np .zeros ((2 * nquad , 3 ), dtype = np . int )
158+ faces = np .zeros ((2 * nquad , 3 ), dtype = int )
159159 nface = 0
160160 for quad in quads :
161161 if (quad [0 ] % 2 ) == 0 :
@@ -182,7 +182,7 @@ def read_geometry(filepath, read_metadata=False, read_stamp=False):
182182 else :
183183 raise ValueError ("File does not appear to be a Freesurfer surface" )
184184
185- coords = coords .astype (np .float ) # XXX: due to mayavi bug on mac 32bits
185+ coords = coords .astype (np .float64 ) # XXX: due to mayavi bug on mac 32bits
186186
187187 ret = (coords , faces )
188188 if read_metadata :
@@ -589,7 +589,7 @@ def read_label(filepath, read_scalars=False):
589589 Only returned if `read_scalars` is True. Array of scalar data for each
590590 vertex.
591591 """
592- label_array = np .loadtxt (filepath , dtype = np . int , skiprows = 2 , usecols = [0 ])
592+ label_array = np .loadtxt (filepath , dtype = int , skiprows = 2 , usecols = [0 ])
593593 if read_scalars :
594594 scalar_array = np .loadtxt (filepath , skiprows = 2 , usecols = [- 1 ])
595595 return label_array , scalar_array
0 commit comments