piel.analysis.metrics.metadata

piel.analysis.metrics.metadata#

Functions#

rename_metrics_collection(...)

Renames each metric in the provided ScalarMetricCollection with the corresponding name from new_names.

Module Contents#

rename_metrics_collection(collection: piel.types.ScalarMetricCollection, new_names: list[str]) piel.types.ScalarMetricCollection[source]#

Renames each metric in the provided ScalarMetricCollection with the corresponding name from new_names.

Parameters:
  • collection (ScalarMetricCollection) – The original metric collection.

  • new_names (List[str]) – A list of new names for the metrics.

Returns:

A new metric collection with renamed metrics.

Return type:

ScalarMetricCollection

Raises:

ValueError – If the number of new names does not match the number of metrics.