【发布时间】:2022-11-10 20:31:43
【问题描述】:
我有一个由某些点的坐标(x,y)组成的数组。我想获得一个仅由具有-0.1 <= x <= 1.1 并且同时具有-0.1 <= y <= 1.1 的坐标组成的数组。 我对Python的经验很少,你有什么想法吗?
x_right = np.array[: , 1]
for vor.vertices in coords:
if (-0.1 <= vor.vertices[0,:] <= 1.1):
x_right.append([vor.vertices[0]],[])
xy_right = [x_right.append(i[0]),[]]
for j[1] in x_right:
if (-0.1 <= j[1] <= 1.1):
xy_giuste = [x_giuste.append(i[0]), J[1] ]
【问题讨论】: