def test_mergeComps_K5_D3_withELBO_kA0(self, K=5, D=3):
    SS = self.makeSuffStatBagAndFillWithOnes(K, D)
    self.addELBOtoSuffStatBag(SS, K)
    SS.mergeComps(0, 1)
    s, N, x, xxT = self.getExpectedMergedFields(K, D)

    assert SS.K == K - 1
    assert SS._ELBOTerms.K == K - 1
    assert SS._MergeTerms.K == 1 - K
    
    assert np.allclose(SS.s, s)
    assert np.allclose(SS.N, N)
    assert np.allclose(SS.x, x)
    assert np.allclose(SS.xxT, xxT)
    
    assert np.allclose(SS.getELBOTerm('Elogz'), [2., 1, 1, 1])
    assert np.allclose(SS.getELBOTerm('Econst'), 1.0)
    assert np.all(np.isnan(SS._MergeTerms.Elogz[0,1:]))
    assert np.all(np.isnan(SS._MergeTerms.Elogz[:0,0]))
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/tests/suffstats/TestSuffStatBag.py/TestSuffStatBag.test_mergeComps_K5_D3_withELBO_kA0/swapped operands of `-`