def test_init(self):

        # Some simple initializations
        p = Beta([1.5, 4.2])

        # Check that plates are correct
        p = Beta([2, 3], plates=(4,3))
        self.assertEqual(p.plates,
                         (4,3))
        p = Beta(np.ones((4,3,2)))
        self.assertEqual(p.plates,
                         (4,3))

        # Parent not a vector
        self.assertRaises(ValueError,
                          Beta,
                          4)
        
        # Parent vector has wrong shape
        self.assertRaises(ValueError,
                          Beta,
                          [4])
        self.assertRaises(ValueError,
                          Beta,
                          [4,4,4])

        # Parent vector has invalid values
        self.assertRaises(ValueError,
                          Beta,
                          [-2,3])

        # Plates inconsistent
        self.assertRaises(ValueError,
                          Beta,
                          np.ones((4,2)),
                          plates=(3,))

        # Explicit plates too small
        self.assertRaises(ValueError,
                          Beta,
                          np.ones((4,2)),
                          plates=(1,))

        pass
Test the creation of beta nodes.
dataset/ETHPy150Open bayespy/bayespy/bayespy/inference/vmp/nodes/tests/test_beta.py/TestBeta.test_init