triqs.gfs.backwd_compat.gf_imtime.GfImTime.__getitem__
- GfImTime.__getitem__(key)
Return a mesh point, a sliced view, or a target-space sub-block.
The bracket operator dispatches on the type of
key:g[:]— returnself(so thatg[:] << RHSis equivalent tog << RHS).g[mp]withmpaMeshPoint,IdxorMatsubaraFreq— return the target-space slab at that mesh point (a numpy array).g[mp0, mp1, ...]— same, for aMeshProduct.g[mp, :](mix of mesh points and:) — return aGfon the remaining mesh axes.g[i, j, ...]with all-integer indices — extract atarget_rank-dimensional sub-block as aGfview of reduced target rank.g[i:j, ...]with all-slice indices — slice the target space and return aGfview.
- Parameters:
- keyslice, MeshPoint, Idx, MatsubaraFreq, int, or tuple thereof
See the bullet list above.
- Returns:
- Gf or numpy.ndarray
A
Gfview when the operation slices the mesh or target space; a numpy array whenkeyresolves to a single mesh point.
Notes
Partial slicing of the mesh and string indices are not supported.