python判断两列表的相同元素,并返回索引

2019-06-06  本文已影响0人  Williamongh
keep_bool = np.sum([a==i for i in b], axis=0)
keep_indices = np.where(keep_bool)[0]
print(keep_bool)
return keep_indices
上一篇 下一篇

猜你喜欢

热点阅读