stormlog.infer.report_stats

Small statistics helpers shared by the inference reports.

Functions

int_value(value)

is_number(value)

A finite real number; NaN and infinities in an artifact are no value.

number_values(records, field)

percentile(values, percent)

stormlog.infer.report_stats.number_values(records, field)[source]
Parameters:
  • records (Iterable[dict[str, Any]])

  • field (str)

Return type:

list[float]

stormlog.infer.report_stats.percentile(values, percent)[source]
Parameters:
  • values (list[float])

  • percent (int)

Return type:

float | None

stormlog.infer.report_stats.int_value(value)[source]
Parameters:

value (Any)

Return type:

int

stormlog.infer.report_stats.is_number(value)[source]

A finite real number; NaN and infinities in an artifact are no value.

Parameters:

value (Any)

Return type:

TypeGuard[int | float]