Line too long (88 > 79 characters):
36 An n_group-length vector of integers containing theLine too long (90 > 79 characters):
37 numbers of data points in each group in the metadata.Line too long (81 > 79 characters):
46 - group_str (str): A string containing the pretty name of that group.Line too long (93 > 79 characters):
63 CombinatorialGroupers form groups by taking all possible combinations of the metadataLine too long (82 > 79 characters):
68 and if in dataset.metadata, country is in {0, 1} and time is in {0, 1, 2},Line too long (80 > 79 characters):
77 If groupby_fields is None, then all data points are assigned to group 0.Line too long (92 > 79 characters):
85 raise ValueError("Grouper should be defined for the full dataset, not a subset")Line too long (84 > 79 characters):
92 # so we can measure the cardinality of each field by taking its max + 1.Line too long (99 > 79 characters):
94 self.groupby_field_indices = [i for (i, field) in enumerate(dataset.metadata_fields) ifLine too long (97 > 79 characters):
97 raise ValueError('At least one group field not found in dataset.metadata_fields')Line too long (84 > 79 characters):
98 grouped_metadata = dataset.metadata_array[:, self.groupby_field_indices]Line too long (121 > 79 characters):
103 f'CombinatorialGrouper: converting metadata with fields [{", ".join(groupby_fields)}] into long')Line too long (114 > 79 characters):
109 f"Metadata for CombinatorialGrouper cannot have values less than 0: {field}, {min_value}")Line too long (141 > 79 characters):
112 f"Minimum metadata value for CombinatorialGrouper is not 0 ({field}, {min_value}). This will result in empty groups")Line too long (82 > 79 characters):
125 groups = metadata[:, self.groupby_field_indices].long() @ self.factorsLine too long (80 > 79 characters):
141 metadata[i] = (group % self.factors_np[i + 1]) // self.factors_np[i]Line too long (82 > 79 characters):
148 meta_val = self.metadata_map[self.groupby_fields[i]][meta_val]Line too long (89 > 79 characters):
164 return self.group_str(group).replace('=', ':').replace(',', '_').replace(' ', '')