def test_change_dimen_prob(self):
    sampler = gibbs.RandGibbsAlgo(num_dim=3)
    sampler.change_dimen_prob(new_probs=np.array([2, 0, 1]))
    npt.assert_array_equal(sampler.dimen_prob, (np.array([2, 0, 1]) / np.sum(np.array([2, 0, 1]))))
    with self.assertRaises(ValueError):
        sampler.change_dimen_prob(new_probs=np.array([[2], [0], [1]]))
    with self.assertRaises(ValueError):
        sampler.change_dimen_prob(new_probs=np.array([2, 1]))
def test_change_dimen_prob(self):
    sampler = gibbs.RandGibbsAlgo(num_dim=3)
    sampler.change_dimen_prob(new_probs=np.array([2, 0, 1]))
    npt.assert_array_equal(sampler.dimen_prob, (np.array([2, 0, 1]) / np.sum(np.array([2, 0, 1]))))
    with self.assertRaises(ValueError):
        sampler.change_dimen_prob(new_probs=np.array([[2], [0], [1]]))
    with self.assertRaises(ValueError):
        sampler.change_dimen_prob(new_probs=np.array([2, 1]))