rizer.misc.yaml_utils#

Shared YAML-loading helpers.

Classes#

ScientificFloatLoader

yaml.SafeLoader that also parses 1e5-style numbers as float.

Module Contents#

class rizer.misc.yaml_utils.ScientificFloatLoader(stream)#

Bases: yaml.SafeLoader

yaml.SafeLoader that also parses 1e5-style numbers as float.

PyYAML’s default float resolver requires a decimal point in the mantissa (1.0e5) and treats 1e5 as a string. This loader extends the resolver pattern so values such as 1e18 or 2e-3 are returned as Python floats.