This commit is contained in:
FilippoOlivo
2025-11-14 17:03:38 +01:00
parent 43163fdf74
commit 0b877d86b9
6 changed files with 20 additions and 20 deletions

View File

@@ -17,16 +17,13 @@ class PinaDatasetFactory:
"""
Factory class to create PINA datasets based on the provided conditions
dictionary.
:param dict conditions_dict: A dictionary where keys are condition names
and values are dictionaries containing the associated data.
:return: A dictionary mapping condition names to their respective
:class:`PinaDataset` instances.
"""
def __new__(cls, conditions_dict, **kwargs):
"""
Create PINA dataset instances based on the provided conditions
dictionary.
:param dict conditions_dict: A dictionary where keys are condition names
and values are dictionaries containing the associated data.
:return: A dictionary mapping condition names to their respective
@@ -92,6 +89,7 @@ class PinaDataset(Dataset):
def __len__(self):
"""
Return the length of the dataset.
:return: The length of the dataset.
:rtype: int
"""
@@ -134,6 +132,7 @@ class PinaDataset(Dataset):
def update_data(self, update_dict):
"""
Update the dataset's data in-place.
:param dict update_dict: A dictionary where keys are condition names
and values are dictionaries with updated data for those conditions.
"""