triqs.utility.comparison_tests.assert_block_gfs_are_close
- triqs.utility.comparison_tests.assert_block_gfs_are_close(a, b, precision=1e-06)[source]
Assert that two
BlockGfobjects are equal block by block.Iterates over the blocks of
aandbin parallel, checks that the block names match, and defers the data comparison of each block toassert_gfs_are_close().- Parameters:
- a, btriqs.gf.BlockGf
Block Green’s functions with the same number of blocks and the same block names.
- precisionfloat, optional
Maximum allowed element-wise absolute difference on each block’s data array. Default
1e-6.
- Raises:
- AssertionError
If the number of blocks differs, the block names differ, or any block fails
assert_gfs_are_close().