def __init__(self, left): """ Constructor. Args: left (Dist) : distribution. """ Dist.__init__(self, left=left, _length=len(left), _advance=True)
def __init__(self, dist): """ Constructor. Args: dist (Dist) : distribution (>=0). """ assert isinstance(dist, Dist) assert numpy.all(dist.range() >= 0) Dist.__init__(self, dist=dist, _length=len(dist), _advance=True)
def __init__(self, dist): """ Constructor. Args: dist (Dist) : distribution (>=0). """ assert isinstance(dist, Dist) assert numpy.all(dist.range()>=0) Dist.__init__(self, dist=dist, _length=len(dist), _advance=True)
def __init__(self, dist, n=2): """ Constructor. Args: left (Dist, array_like) : Left hand side. right (Dist, array_like) : Right hand side. """ assert isinstance(dist, Dist) assert numpy.all(dist.range() >= 0) assert n > 0 and n != 1 Dist.__init__(self, dist=dist, n=n, _length=len(dist), _advance=True)
def __init__(self, dist, n=2): """ Constructor. Args: left (Dist, array_like) : Left hand side. right (Dist, array_like) : Right hand side. """ assert isinstance(dist, Dist) assert numpy.all(dist.range()>=0) assert n>0 and n!=1 Dist.__init__(self, dist=dist, n=n, _length=len(dist), _advance=True)
def __init__(self, left, right): """ Constructor. Args: left (Dist, array_like) : Left hand side. right (Dist, array_like) : Right hand side. """ left_ = 1 if not isinstance(left, Dist) else len(left) right_ = 1 if not isinstance(right, Dist) else len(right) length = max(left_,right_) Dist.__init__(self, left=left, right=right, _length=length, _advance=True)
def __init__(self, dist, C): """ Constructor. Args: dist (Dist, array_like) : Probability. C (numpy.ndarray) : matrix to multiply with. """ Dist.__init__(self, dist=dist, C=C, Ci=numpy.linalg.inv(C), _length=len(dist), _advance=True)
def __init__(self, left, right): """ Constructor. Args: left (Dist, array_like) : Left hand side. right (Dist, array_like) : Right hand side. """ left_ = not isinstance(left, Dist) or 1 and len(left) right_ = not isinstance(right, Dist) or 1 and len(right) if isinstance(left, Dist): assert not numpy.any(numpy.prod(left.range(), 0) < 0) if isinstance(right, Dist): assert not numpy.any(numpy.prod(right.range(), 0) < 0) length = max(left_, right_) Dist.__init__(self, left=left, right=right, _length=length, _advance=True)
def __init__(self, left, right): """ Constructor. Args: left (Dist, array_like) : Left hand side. right (Dist, array_like) : Right hand side. """ if isinstance(left, Dist): assert not left.dependent() assert numpy.all(left.range()[0] < right) if isinstance(right, Dist): assert not right.dependent() assert numpy.all(left < right.range()[1]) left_ = not isinstance(left, Dist) or 1 and len(left) right_ = not isinstance(right, Dist) or 1 and len(right) length = max(left_, right_) Dist.__init__(self, left=left, right=right, _length=length, _advance=True)