我有一个坐标数组,如下所示:
import numpy as np
values_to_test = np.array([[1 , 0],[2 , 0],[2 , 0.5],[1 , 0.5],[0 , 0],[2 , 1], [0 , 0.5],[1 , 1],[0 , 1]])
作为我的最终目标,我需要从包含以下数组的特定坐标的values_to_test
个位置中 Select 位置:
specific_values=np.array([[1,0],[0,0],[1,1]])
个
因此,我期望得到如下结果:[True,False,False,False,True,False,False,True,False]
I know if this was a 1D
array I could use np.where
but I cannot think about a way to handle this problem.
Appreciate your help