hestia_earth.utils.tools.safe_parse_float

hestia_earth.utils.tools.safe_parse_float(value, default=0)[source]

Parse a string into a float.

Parameters
  • value (str) – The string value to parse.

  • default – The default value if parsing not possible.

Returns

The value as float or default value.

Return type

float