logging#


set_numerical_fields_to_precision(data: dict[str, Any], precision: int = 3) dict[str, Any][source]#

Returns a copy of the given dictionary with all numerical values rounded to the given precision.

Note: does not recurse into nested dictionaries.

Parameters:
  • data – a dictionary

  • precision – the precision to be used