Skip to content

Apply rtol and atol to float32 data types

Hello Uwe, working on a project with this library we have encountered issues with the way float32 are not handled as float columns and because of that the options "atol" and "rtol" are not applied correctly to them.

This MR fixes the issue.

You can reproduce the issue with this test:

def test_float32_accepts_atol(snapshot):
    df = pd.DataFrame({"a": [0.0]}, dtype=pd.Float32Dtype)

    # uncomment after capturing the output to reproduce issue with atol
    #df["a"] += 0.01 

    snapshot.check(df, atol=0.1)

/cc @eng.delaunay

Merge request reports

Loading