plaid.storage.zarr.bridge ========================= .. py:module:: plaid.storage.zarr.bridge .. autoapi-nested-parse:: Zarr bridge utilities. This module provides utility functions for bridging between PLAID samples and Zarr storage format. It includes functions for key transformation and sample data conversion. Functions --------- .. autoapisummary:: plaid.storage.zarr.bridge.to_var_sample_dict plaid.storage.zarr.bridge.sample_to_var_sample_dict Module Contents --------------- .. py:function:: to_var_sample_dict(zarr_dataset: zarr.Group, idx: int, features: Optional[list[str]]) -> dict[str, Any] Extracts a sample dictionary from a Zarr dataset by index. :param zarr_dataset: The Zarr group containing the dataset. :type zarr_dataset: zarr.Group :param idx: The sample index to extract. :type idx: int :param features: Iterable of feature names (keys) to extract from the dataset. :returns: Dictionary of variable features for the sample. :rtype: dict[str, Any] .. py:function:: sample_to_var_sample_dict(zarr_sample: dict[str, Any]) -> dict[str, Any] Converts a Zarr sample to a variable sample dictionary. :param zarr_sample: The raw Zarr sample data. :type zarr_sample: dict[str, Any] :returns: The processed variable sample dictionary. :rtype: dict[str, Any]