np.array_equal(A,B) # test if same shape, same elements values np.array_equiv(A,B) # test if broadcastable shape, same elements values np.allclose(A,B,...) # test if same shape, elements have close enough values