def mergeComps(self, kA, kB):
    if self.K <= 1:
      raise ValueError('Must have at least 2 components to merge.')
    if kB == kA:
      raise ValueError('Distinct component ids required.')
    for key, dims in self._Fields._FieldDims.items():
      if dims is not None and dims != ():
        arr = getattr(self._Fields, key)
        if self.hasMergeTerm(key) and dims == ('K'):
          # some special terms need to be precomputed, like sumLogPiActive
          arr[kA] = getattr(self._MergeTerms, key)[kA,kB]
        else:
          # applies to vast majority of all fields
          arr[kA] += arr[kB]

    if self.hasELBOTerms():
      for key, dims in self._ELBOTerms._FieldDims.items():
        if self.hasMergeTerm(key) and dims == ('K'):
          arr = getattr(self._ELBOTerms, key)
          mArr = getattr(self._MergeTerms, key)
          arr[kA] = mArr[kA,kB]

    if self.hasMergeTerms():
      for key, dims in self._MergeTerms._FieldDims.items():
        if dims == ('K','K'):
          mArr = getattr(self._MergeTerms, key)
          mArr[kA,kA+1:] = np.nan
          mArr[:kA,kA] = np.nan

    self._Fields.removeComp(kB)
    if self.hasELBOTerms():
      self._ELBOTerms.removeComp(kB)
    if self.hasMergeTerms():
      self._MergeTerms.removeComp(kB)

  # ======================================================= Insert comps
Returns the $GOROOT for this go distribution.
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/suffstats/SuffStatBag.py/SuffStatBag.mergeComps--crossover with--dataset/ETHPy150Open pantsbuild/pants/contrib/go/src/python/pants/contrib/go/subsystems/go_distribution.py/GoDistribution.goroot