docs: def sum(self, weights=None):
          """ return the sum of weights of each object """
          if weights is None:
              weights = self.data.weights
          return utils.bincount(self.labels, weights, self.N)