docs: def compute_sum_values(i, j, data1, data2):
      """
      Return the sum1_ij and sum2_ij values given
      the input indices and data instances.
  
      Notes
      -----
      This is called in `Binning.update_sums` to compute
      the `sum1` and `sum2` contributions for indices `(i,j)`
  
      Parameters
      ----------
      i,j : array_like
          the bin indices for these pairs
      data1, data2 : `points`, `field` instances
          the two `points` or `field` objects
  
      Returns
      -------
      sum1_ij, sum2_ij : float, array_like (N,...)
          contributions to sum1, sum2 -- either a float or array
          of shape (N, ...) where N is the length of `i`, `j`
      """
      sum1_ij = 1.
      for idx, d in zip([i,j], [data1, data2]):
          if isinstance(d, field): sum1_ij *= d.wvalue[idx]
          elif isinstance(d, points): sum1_ij *= d.weights[idx]
          else:
              raise NotImplementedError("data type not recognized")
      sum2_ij = data1.weights[i] * data2.weights[j]
  
      return sum1_ij, sum2_ij