ennreal

The extended nonnegative real numbers. This is usually denoted [0, ∞], and is relevant as the codomain of a measure.

ennreal.to_nnreal

to_nnreal x returns x if it is real, otherwise 0.

ennreal.to_real

to_real x returns x if it is real, 0 otherwise.

ennreal.of_real

of_real x returns x if it is nonnegative, 0 otherwise.