np.intersect1d を使用する
import numpy as np
array_1 = np.array([1, 2, 3, 4, 5])
array_2 = np.array([1, 3, 5, 7, 9])
np.intersect1d(array_1, array_2)
Go to list of users who liked
More than 3 years have passed since last update.
np.intersect1d を使用する
import numpy as np
array_1 = np.array([1, 2, 3, 4, 5])
array_2 = np.array([1, 3, 5, 7, 9])
np.intersect1d(array_1, array_2)
Register as a new user and use Qiita more conveniently
Go to list of users who liked