Codacy correction
This commit is contained in:
committed by
Nicola Demo
parent
ea3d1924e7
commit
dd43c8304c
@@ -19,15 +19,17 @@ class SamplePointDataset(BaseDataset):
|
||||
data_dict.pop('equation')
|
||||
super().add_points(data_dict, condition_idx)
|
||||
|
||||
def _init_from_problem(self, collector_dict, batching_dim=0):
|
||||
def _init_from_problem(self, collector_dict):
|
||||
for name, data in collector_dict.items():
|
||||
keys = list(data.keys())
|
||||
if set(self.__slots__) == set(keys):
|
||||
data = deepcopy(data)
|
||||
data.pop('equation')
|
||||
self._populate_init_list(data)
|
||||
idx = [key for key, val in
|
||||
self.problem.collector.conditions_name.items() if
|
||||
val == name]
|
||||
idx = [
|
||||
key for key, val in
|
||||
self.problem.collector.conditions_name.items()
|
||||
if val == name
|
||||
]
|
||||
self.conditions_idx.append(idx)
|
||||
self.initialize()
|
||||
|
||||
Reference in New Issue
Block a user