Skip to content

Commit

Permalink
MNT: Update int calls to remove warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
zssherman committed Dec 13, 2023
1 parent 49dddec commit d86c93b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tint/grid_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_radar_info(grid_obj):

def get_grid_alt(grid_size, alt_meters=1500):
""" Returns z-index closest to alt_meters. """
return np.int(np.round(alt_meters/grid_size[0]))
return np.int64(np.round(alt_meters/grid_size[0]))


def get_vert_projection(grid, thresh=40):
Expand Down
8 changes: 4 additions & 4 deletions tint/matching.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ def predict_search_extent(obj1_extent, shift, params, grid_size):
x2 = shifted_center[0] + search_radius_r + 1
y1 = shifted_center[1] - search_radius_c
y2 = shifted_center[1] + search_radius_c + 1
x1 = np.int(x1)
x2 = np.int(x2)
y1 = np.int(y1)
y2 = np.int(y2)
x1 = np.int64(x1)
x2 = np.int64(x2)
y1 = np.int64(y1)
y2 = np.int64(y2)
return {'x1': x1, 'x2': x2, 'y1': y1, 'y2': y2,
'center_pred': shifted_center, 'valid': True}

Expand Down
8 changes: 4 additions & 4 deletions tint/phase_correlation.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ def get_ambient_flow(obj_extent, img1, img2, params, grid_size):
row_ub = obj_extent['obj_center'][0] + obj_extent['obj_radius'] + margin_r
col_lb = obj_extent['obj_center'][1] - obj_extent['obj_radius'] - margin_c
col_ub = obj_extent['obj_center'][1] + obj_extent['obj_radius'] + margin_c
row_lb = np.int(row_lb)
row_ub = np.int(row_ub)
col_lb = np.int(col_lb)
col_ub = np.int(col_ub)
row_lb = np.int64(row_lb)
row_ub = np.int64(row_ub)
col_lb = np.int64(col_lb)
col_ub = np.int64(col_ub)

dims = img1.shape

Expand Down
4 changes: 2 additions & 2 deletions tint/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ def lagrangian_view(tobj, grids, tmp_dir, uid=None, vmin=-8, vmax=64,
display = pyart.graph.GridMapDisplay(grid)

# Box Size
tx = np.int(np.round(row['grid_x']))
ty = np.int(np.round(row['grid_y']))
tx = np.int64(np.round(row['grid_x']))
ty = np.int64(np.round(row['grid_y']))
tx_met = grid.x['data'][tx]
ty_met = grid.y['data'][ty]
lat = row['lat']
Expand Down

0 comments on commit d86c93b

Please sign in to comment.