def __init__(self, nseed=2147483647): """ Initiates the object and sets the seed. """ errtxt = "The seed must be a positive integer in GeneralRandomStream\n" errtxt += "\t(external feeds cannot be used)" assert is_posinteger(nseed), errtxt ABCRand.__init__(self, nseed) self._feed = False
def __init__(self, nseed=2147483647): """ The seed 'nseed' must be a positive integer or a feed (a list or a tuple) of numbers in [0.0, 1.0]! """ if isinstance(nseed, int): errtxt = "The seed (if not a feed) must be a positive\n" errtxt += "\tinteger in InverseRandomStream!" assert is_posinteger(nseed), errtxt ABCRand.__init__(self, nseed, 'InverseRandomStream')