to compare Two Arrays in Python just Use == and numpy.all() .By using == and numpy.all() you can compare Two Arrays in Python. So lets learn about of this without wasting time by given below example: import numpy as np ary1 = np.array([11,12,14,16,17]) ary2 = np.array([11,13,14,15,17]) ary3 = np.array([11,13,14.00001,15,17]) print((ary1==ary2).all()) print((ary3==ary2).all()) Output : False False