I\'m looking to compare two dataframes which should be identical. However due to floating point precision I am being told the values don\'t match. I have created an example
OK you can use np.isclose for this:
In [250]: np.isclose(a,b) Out[250]: array([[ True], [ True]], dtype=bool)
np.isclose takes relative tolerance and absolute tolerance. These have default values: rtol=1e-05, atol=1e-08 respectively
np.isclose
rtol=1e-05
atol=1e-08