def encode(self, encoding): # TODO: get rid of dtypes return { 'binners': encoding.encode_list('binner', self.binners), 'aggregation': encoding.encode("aggregation", self.aggregation_description), 'dtypes': encoding.encode_dict("dtype", self.dtypes) }
def encode(self, encoding): # TODO: get rid of dtypes encoded = { 'grid': encoding.encode('grid', self.grid), 'aggregations': encoding.encode_list("aggregation", self.aggregation_descriptions), 'dtypes': encoding.encode_dict("dtype", self.dtypes) } if self.has_values: encoded['values'] = encoding.encode_list2('ndarray', self.get_values()) return encoded
def encode(self, encoding): # TODO: get rid of dtypes return { 'task': type(self).name, 'grid': encoding.encode('grid', self.parent_grid), 'aggregations': encoding.encode_list("aggregation", self.aggregation_descriptions), 'dtypes': encoding.encode_dict("dtype", self.dtypes) }