Commit 3f79bf6a authored by Bognár, Á.'s avatar Bognár, Á.
Browse files

fix "float cannot be safely interpreted as int" error

in the grid_2d() function
parent e66ebbc8
......@@ -61,8 +61,8 @@ def grid_2d(bbox_2d, d, edges):
#print('a={}; b={}; x={}; y={}; n={}'.format(a,b,x,y,n))
xs = (bbox_2d.vertices_list[0][0], bbox_2d.vertices_list[2][0])
ys = (bbox_2d.vertices_list[0][1], bbox_2d.vertices_list[2][1])
xv = np.linspace(xs[0], xs[1], round(x+1, 0))
yv = np.linspace(ys[0], ys[1], round(y+1, 0)) # this should be a func of the reatio of width height of the bbox
xv = np.linspace(xs[0], xs[1], int(round(x+1, 0)))
yv = np.linspace(ys[0], ys[1], int(round(y+1, 0))) # this should be a func of the reatio of width height of the bbox
grid = np.meshgrid(xv, yv)
if edges == False:
lr = max(grid[0].max() - grid[0].min(), grid[1].max() - grid[1].min()) # calc the length of the module in the row-direction (longer direction)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment