def __init__(self, ps):
        if not type(ps) is numpy.ndarray:
            raise TypeError("Probability vector must be a numpy array")
        
        Distribution.__init__(self, len(ps))
        
        if not len(ps) > 0:
            raise ValueError("Probability vector must contain at least one element")
        
        if not all(ps > 0) and all (ps < 1):
            raise ValueError("Probability vector must lie in (0,1)")
            
        self.ps = ps
dataset/ETHPy150Open karlnapf/kameleon-mcmc/kameleon_mcmc/distribution/Bernoulli.py/Bernoulli.__init__/original