triqs.utility.comparison_tests.assert_gfs_are_close

triqs.utility.comparison_tests.assert_gfs_are_close(a, b, precision=1e-06)[source]

Assert that two Green’s functions agree on their data array.

Checks that a and b have the same mesh type and equal meshes, then compares a.data and b.data via assert_arrays_are_close().

Parameters:
a, btriqs.gf.Gf

Green’s functions with identical mesh and target shape.

precisionfloat, optional

Maximum allowed element-wise absolute difference on the data array. Default 1e-6.

Raises:
AssertionError

If the mesh types differ, the meshes are not equal, or the data arrays differ by more than precision.