def test_update_soVB(self, rho=0.25):
    ''' Verify the blend update for stochastic variational is correct
    '''
    distrB = copy.deepcopy(self.distr)
    distrB.invW *= 3
    distrB.m += 2
    distrB.kappa *= 10
    distrB2 = copy.deepcopy(distrB)
    # Make sure things are different!
    assert not np.allclose(distrB.invW, self.distr.invW)
    assert not np.allclose(distrB.m, self.distr.m)
    
    distrB.post_update_soVB(rho, self.distr)
    assert distrB.dF == distrB2.dF * (1-rho) + self.distr.dF * rho
    assert np.allclose(distrB.kappa, distrB2.kappa * (1-rho) + self.distr.kappa * rho)

    # these dont work because the parameterization is a bit trickier here.
    #assert np.allclose(distrB.invW, distrB2.invW * (1-rho) + self.distr.invW * rho)
    #assert np.allclose(distrB.m, distrB2.m * (1-rho) + self.distr.m * rho)
dataset/ETHPy150Open daeilkim/refinery/refinery/bnpy/bnpy-dev/tests/distr/TestGaussWishDistr.py/TestGaussWishDistr.test_update_soVB/original