triqs.gfs.descriptor_base.convert_scalar_to_const

triqs.gfs.descriptor_base.convert_scalar_to_const(expr)[source]

Lift scalars inside a lazy expression to Const descriptors.

Used by __lshift__() so that g << 2.0 and g << iOmega_n + 0.5 are handled by the descriptor machinery.

Parameters:
exprLazyExpr

Expression that may contain raw scalar leaves.

Returns:
LazyExpr

Equivalent expression with every scalar wrapped in a Const.