def test__init__(self):
    sampler = gibbs.RandGibbsAlgo(num_dim=2)
    self.assertEqual(sampler.num_dim, 2)
    self.assertEqual(len(sampler.one_d_samplers), 0)
    self.assertEqual(len(sampler.chain_states), 1)
    npt.assert_array_equal(sampler.initial_state, np.zeros(2))
    npt.assert_array_equal(sampler.current_state, np.zeros(2))
    with self.assertRaises(ValueError):
        gibbs.RandGibbsAlgo(3, dimen_prob=np.ones(2))
    with self.assertRaises(ValueError):
        gibbs.RandGibbsAlgo(2, dimen_prob=[[1], [2]])
def test__init__(self):
    sampler = gibbs.RandGibbsAlgo(num_dim=2)
    self.assertEqual(sampler.num_dim, 2)
    self.assertEqual(len(sampler.one_d_samplers), 0)
    self.assertEqual(len(sampler.chain_states), 1)
    npt.assert_array_equal(sampler.initial_state, np.zeros(2))
    npt.assert_array_equal(sampler.current_state, np.zeros(2))
    with self.assertRaises(ValueError):
        gibbs.RandGibbsAlgo(3, dimen_prob=np.ones(2))
    with self.assertRaises(ValueError):
        gibbs.RandGibbsAlgo(2, dimen_prob=[[1], [2]])