numpy.unique
code:python
>> set(np.int64("1 2 3 1 4 2 0".split()))
{0, 1, 2, 3, 4}
>> np.unique(np.int64("1 2 3 1 4 2 0".split()))
setがハッシュテーブルであるのに対し、こちらはソート済みのnp.arrayである
This function uses the same algorithm as the builtin python bisect.bisect_left (side='left') and bisect.bisect_right (side='right') functions, which is also vectorized in the v argument.