docs: def update_sums(self, r, i, j, data1, data2, sum1, sum2, N=None, centers_sum=None):
          """
          The main function that digitizes the pair counts,
          calls bincount for the appropriate `sum1` and `sum2`
          values, and adds them to the input arrays,
  
          will modify sum1, sum2, N, and centers_sum inplace.
  
          """
          # the summation values for this (r,i,j)
          sum1_ij, sum2_ij = compute_sum_values(i, j, data1, data2)
  
          # digitize
          digr = self.digitize(r, i, j, data1, data2)
  
          if len(digr) == 3 and isinstance(digr[1], dict):
              dig, paircoords, weights = digr
          elif len(digr) == 2 and isinstance(digr[1], dict):
              dig, paircoords = digr
              weights = None
          else:
              dig = digr
              paircoords = None
              weights = None
  
          # sum 1
          def add_one_channel(sum1c, sum1_ijc):
              if numpy.isscalar(sum1_ijc) or sum1_ijc.ndim == 1:
                  sum1c.flat[:] += utils.bincount(dig, sum1_ijc, minlength=sum1c.size)
              else:
                  for d in range(sum1c.shape[0]):
                      sum1c[d].flat[:] += utils.bincount(dig, sum1_ijc[...,d], minlength=sum1c[d].size)
  
          if self.channels:
              if weights is None:
                  raise RuntimeError("`digitize` of multi channel paircount did not return a weight array for the channels")
  
              sum1_ij = weights * sum1_ij
              # sum1_ij[ichannel, dig, dim]
              for ichannel in range(len(self.channels)):
                  add_one_channel(sum1[ichannel], sum1_ij[ichannel])
          else:
              # sum1_ij[dig, dim]
              add_one_channel(sum1, sum1_ij)
  
          # sum 2, if both data are not points
          if not numpy.isscalar(sum2):
              sum2.flat[:] += utils.bincount(dig, sum2_ij, minlength=sum2.size)
  
          if N is not None:
              if not paircoords:
                  raise RuntimeError("Bin center is requested but not returned by digitize")
              # update the mean coords
              self._update_mean_coords(dig, N, centers_sum, **paircoords)