def __iadd__(self, PB):
    if self.K != PB.K or self.D != PB.D:
      raise ValueError('Dimension mismatch')
    for key in self._FieldDims:
      arrA = getattr(self, key)
      arrB = getattr(PB, key)
      self.setField(key, arrA + arrB)
    return self


  ######################################################### Subtract bags
  #########################################################
In-place add. Updates self, with fields equal to self + PB.
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/bnpy/suffstats/ParamBag.py/ParamBag.__iadd__