code: def to_dict(self):
          
          return {'n':self.n, 'delta':self.delta, 'K':self.K, 'centroids':self.centroids_to_list()}
docs: Returns a Python dictionary of the TDigest and internal Centroid values.
          Or use centroids_to_list() for a list of only the Centroid values.