@@ -105,11 +105,11 @@ def _uv2pix(c, res=6):
105
105
106
106
i = x * num_pix_side
107
107
i [i > 2 ** res1 - 1 ] = 2 ** res1 - 1
108
- i = np .array (i , dtype = np . int )
108
+ i = np .array (i , dtype = int )
109
109
110
110
j = y * num_pix_side
111
111
j [j > 2 ** res1 - 1 ] = 2 ** res1 - 1
112
- j = np .array (j , dtype = np . int )
112
+ j = np .array (j , dtype = int )
113
113
114
114
fij = np .empty ([npts , 3 ])
115
115
fij [:, 0 ] = face
@@ -151,9 +151,9 @@ def _axisxy(c):
151
151
c1 = np .array ([c .y .value ])
152
152
c2 = np .array ([c .z .value ])
153
153
154
- abs_yx = np .ones_like (c0 , dtype = np . float )* np .inf
155
- abs_zx = np .ones_like (c0 , dtype = np . float )* np .inf
156
- abs_zy = np .ones_like (c0 , dtype = np . float )* np .inf
154
+ abs_yx = np .ones_like (c0 , dtype = float )* np .inf
155
+ abs_zx = np .ones_like (c0 , dtype = float )* np .inf
156
+ abs_zy = np .ones_like (c0 , dtype = float )* np .inf
157
157
158
158
g = c0 != 0
159
159
abs_yx [g ] = np .abs (c1 [g ]/ c0 [g ])
@@ -248,10 +248,10 @@ def _fij2pix(fij, res):
248
248
249
249
n = len (fij )
250
250
251
- pixel_1 = np .zeros (n , dtype = np . int )
251
+ pixel_1 = np .zeros (n , dtype = int )
252
252
253
- i = np .array (fij [:, 1 ], dtype = np . int )
254
- j = np .array (fij [:, 2 ], dtype = np . int )
253
+ i = np .array (fij [:, 1 ], dtype = int )
254
+ j = np .array (fij [:, 2 ], dtype = int )
255
255
256
256
num_pix_face = 4 ** (res - 1 )
257
257
@@ -263,7 +263,7 @@ def _fij2pix(fij, res):
263
263
264
264
pixel = fij [:, 0 ]* num_pix_face + pixel_1
265
265
266
- return np .array (pixel , dtype = np . int )
266
+ return np .array (pixel , dtype = int )
267
267
268
268
def _incube (alpha , beta ):
269
269
@@ -393,8 +393,8 @@ def _pix2fij(pixel, res=6):
393
393
394
394
pow_2 = 2 ** np .arange (16 )
395
395
396
- i = np .zeros (n , dtype = np . int )
397
- j = np .zeros (n , dtype = np . int )
396
+ i = np .zeros (n , dtype = int )
397
+ j = np .zeros (n , dtype = int )
398
398
399
399
for bit in range (res ):
400
400
i = i | (pow_2 [bit ] * (1 & fpix ))
@@ -500,12 +500,12 @@ def _xyaxis(nface, xi, eta):
500
500
501
501
n = np .size (nface )
502
502
503
- nface_0 = np .array (nface == 0 , dtype = np . int )
504
- nface_1 = np .array (nface == 1 , dtype = np . int )
505
- nface_2 = np .array (nface == 2 , dtype = np . int )
506
- nface_3 = np .array (nface == 3 , dtype = np . int )
507
- nface_4 = np .array (nface == 4 , dtype = np . int )
508
- nface_5 = np .array (nface == 5 , dtype = np . int )
503
+ nface_0 = np .array (nface == 0 , dtype = int )
504
+ nface_1 = np .array (nface == 1 , dtype = int )
505
+ nface_2 = np .array (nface == 2 , dtype = int )
506
+ nface_3 = np .array (nface == 3 , dtype = int )
507
+ nface_4 = np .array (nface == 4 , dtype = int )
508
+ nface_5 = np .array (nface == 5 , dtype = int )
509
509
510
510
row0 = eta * (nface_5 - nface_0 ) + xi * (nface_4 - nface_2 ) + \
511
511
(nface_1 - nface_3 )
@@ -781,8 +781,8 @@ def get_8_neighbors(pixel, res, four_neighbors=False):
781
781
two14 = 2 ** 14
782
782
two28 = 2 ** 28
783
783
784
- ixtab = np .zeros (128 , dtype = np . int )
785
- iytab = np .zeros (128 , dtype = np . int )
784
+ ixtab = np .zeros (128 , dtype = int )
785
+ iytab = np .zeros (128 , dtype = int )
786
786
787
787
bit_table_set (ixtab , iytab )
788
788
pixels_per_face = (2 ** (res - 1 )) ** 2
@@ -812,7 +812,7 @@ def get_8_neighbors(pixel, res, four_neighbors=False):
812
812
ix *= distance
813
813
iy *= distance
814
814
815
- neighbors = np .zeros (4 + 4 * eight_neighbors , dtype = np . int )
815
+ neighbors = np .zeros (4 + 4 * eight_neighbors , dtype = int )
816
816
817
817
#Calculate coordinates of each neighbor, check for edges, and return pixel number
818
818
#in appropriate array element
@@ -1094,11 +1094,11 @@ def _rastr(pixel, res=6, face=False, sixpack=False, data=-1, bad_pixval=0.0):
1094
1094
1095
1095
len0 = i0 * cube_side
1096
1096
1097
- idx = fij [:, 0 ].astype (np . int )
1097
+ idx = fij [:, 0 ].astype (int )
1098
1098
1099
1099
x_out = offx [idx ] * cube_side + fij [:, 1 ]
1100
- x_out = (len0 - (x_out + 1 )).astype (np . int )
1101
- y_out = (offy [idx ] * cube_side + fij [:, 2 ]).astype (np . int )
1100
+ x_out = (len0 - (x_out + 1 )).astype (int )
1101
+ y_out = (offy [idx ] * cube_side + fij [:, 2 ]).astype (int )
1102
1102
1103
1103
if len (data ) != 1 :
1104
1104
thrd = ndata // npix
@@ -1198,20 +1198,20 @@ def _uv2proj(uvec, proj, sz_proj):
1198
1198
if proj .upper () == 'A' :
1199
1199
den = np .sqrt (1.0 + np .cos (lat )* np .cos (lon / 2.0 ))
1200
1200
1201
- proj_x = half_l - np .fix (half_l * (np .cos (lat )* np .sin (lon / 2 ) / den )).astype (np . int )
1202
- proj_y = half_h + np .fix (half_h * (np .sin (lat ) / den )).astype (np . int )
1201
+ proj_x = half_l - np .fix (half_l * (np .cos (lat )* np .sin (lon / 2 ) / den )).astype (int )
1202
+ proj_y = half_h + np .fix (half_h * (np .sin (lat ) / den )).astype (int )
1203
1203
elif proj .upper () == 'S' :
1204
- proj_x = half_l - np .fix (half_l * lon * np .cos (lat ) / np .pi ).astype (np . int )
1205
- proj_y = half_h + np .fix (half_h * lat / (np .pi / 2 )).astype (np . int )
1204
+ proj_x = half_l - np .fix (half_l * lon * np .cos (lat ) / np .pi ).astype (int )
1205
+ proj_y = half_h + np .fix (half_h * lat / (np .pi / 2 )).astype (int )
1206
1206
elif proj .upper () == 'M' :
1207
1207
pass
1208
1208
elif proj .upper () == 'P' :
1209
1209
fac1 = np .sqrt (1 - np .sin (np .abs (lat )))
1210
1210
sgn = np .sign (lat )
1211
1211
fac2 = 1 - (sgn / 2 )
1212
1212
1213
- proj_x = fac2 * half_l - sgn * np .fix (0.5 * half_l * fac1 * np .sin (lon )).astype (np . int )
1214
- proj_y = half_h - np .fix (half_h * fac1 * np .cos (lon )).astype (np . int )
1213
+ proj_x = fac2 * half_l - sgn * np .fix (0.5 * half_l * fac1 * np .sin (lon )).astype (int )
1214
+ proj_y = half_h - np .fix (half_h * fac1 * np .cos (lon )).astype (int )
1215
1215
else :
1216
1216
raise ValueError ("Invalid projection string entered" )
1217
1217
0 commit comments