piel.analysis.metrics.metadata
==============================

.. py:module:: piel.analysis.metrics.metadata


Functions
---------

.. autoapisummary::

   piel.analysis.metrics.metadata.rename_metrics_collection


Module Contents
---------------

.. py:function:: rename_metrics_collection(collection: piel.types.ScalarMetricCollection, new_names: list[str]) -> piel.types.ScalarMetricCollection

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

   :param collection: The original metric collection.
   :type collection: ScalarMetricCollection
   :param new_names: A list of new names for the metrics.
   :type new_names: List[str]

   :returns: A new metric collection with renamed metrics.
   :rtype: ScalarMetricCollection

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


