def test_add_1_d_sampler(self):
    sampler = gibbs.SysGibbsAlgo(num_dim=2, initial_state=np.array([2, 3]))
    new_1_d_sampler = gibbs.OneDimSampler(scipy.stats.norm.rvs, fun)
    sampler.add_1_d_sampler(new_1_d_sampler)
    self.assertEqual(len(sampler.one_d_samplers), 1)
    with self.assertRaises(TypeError):
        sampler.add_1_d_sampler(0)
def test_add_1_d_sampler(self):
    sampler = gibbs.SysGibbsAlgo(num_dim=2, initial_state=np.array([2, 3]))
    new_1_d_sampler = gibbs.OneDimSampler(scipy.stats.norm.rvs, fun)
    sampler.add_1_d_sampler(new_1_d_sampler)
    self.assertEqual(len(sampler.one_d_samplers), 1)
    with self.assertRaises(TypeError):
        sampler.add_1_d_sampler(0)