triqs.gfs.tools.map_block
- triqs.gfs.tools.map_block(fun, G)[source]
Apply
funto every block ofGand return the result.- Parameters:
- funcallable
Function with signature
fun(g) -> Gf(or returning any object — see “Returns” below).- GBlockGf or Block2Gf
Container whose blocks
funis applied to.
- Returns:
- Raises:
Examples
>>> from triqs.gfs import map_block, inverse >>> G_inv = map_block(inverse, G_block)