Example #1
0
 def encode(self, encoding):
     # TODO: get rid of dtypes
     return {
             'binners': encoding.encode_list('binner', self.binners),
             'aggregations': encoding.encode_list("aggregation", self.aggregation_descriptions),
             'dtypes': encoding.encode_dict("dtype", self.dtypes)
             }
Example #2
0
 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
Example #3
0
 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)
     }