1
我使用下面的代码片段来获取唯一数组的列表,但它以一种奇怪的方式重新排列列表。 uniquecoords
每次都必须是相同的顺序还是有任何随机因素?numpy独一无二总是一样吗?
for c in coordiantes:
coords.extend(c)
a = np.array(coords)
uniquecoords = np.unique(
a.view(
np.dtype((np.void, a.dtype.itemsize*a.shape[1])))
).view(a.dtype).reshape(-1, a.shape[1])