

def __init__(self, Z, **kwargs):
    '\n        Create a categorical MC moments to categorical moments conversion node.\n        '
    if (not isinstance(Z._moments, CategoricalMoments)):
        raise ValueError('Input node must be categorical')
    K = Z.dims[0][(- 1)]
    if (K != 2):
        raise Moments.NoConverterError('Only 2-class categorical can be converted to Bernoulli')
    dims = ((),)
    self._moments = BernoulliMoments()
    self._parent_moments = (CategoricalMoments(2),)
    super().__init__(Z, dims=dims, **dims)

dataset/ETHPy150Open bayespy/bayespy/bayespy/inference/vmp/nodes/bernoulli.py CategoricalToBernoulli.__init__/VarMisuse@113/196 `kwargs`->`dims`