names = np.array(['Bob', 'Joe', 'Will', 'Bob', 'Will', 'Joe', 'Joe'])
print(np.unique(names)) #Bob', 'Joe', 'Will'
ints = np.array([3, 3, 3, 2, 2, 1, 1, 4, 4])
print(np.unique(ints)) #1 2 3 4
#'查找数组元素是否在另一数组'
values = np.array([6, 0, 0, 3, 2, 5, 6])
print(np.in1d(values, [2, 3, 6]))