こうじゃね
a = np.array([1, 2, 3, 4, 5])
b = np.array([1, 2, 3, 5, 4])
np.sum(a == b) / a.size