A tool for comparing numpy ndarrays and checking if all their values are Almost EQual up to a given tolerance.
Parameters : | a,b : scalar of numpy.ndarray
tol = 1e-8 :
|
---|---|
Returns : | True, False :
|
Examples
>>> aeq(0,0.00000000000001)
True
>>> aeq(np.array([1,0,0]),np.array([0.99999999999999,0,0]))
True
>>> aeq(np.array([1,0,0]),np.array([0.99999,0,0]))
False