def rand(*size): """This function has the same `nlcpy.random.RandomState.rand` See Also -------- nlcpy.random.RandomState.rand : Random values in a given shape. """ rs = generator._get_rand() return rs.rand(None if len(size) == 0 else size)
def bytes(length): """This function has the same `nlcpy.random.RandomState.bytes` See Also -------- nlcpy.random.RandomState.bytes : Returns random bytes. """ rs = generator._get_rand() return rs.bytes(length)
def sample(*size): """This function has the same `nlcpy.random.RandomState.sample` See Also -------- nlcpy.random.RandomState.sample : This is an alias of random_sample. """ rs = generator._get_rand() return rs.sample(None if len(size) == 0 else size)
def random_sample(size=None): """This function has the same `nlcpy.random.RandomState.random_sample` See Also -------- nlcpy.random.RandomState.random_sample : Returns random floats in the half-open interval [0.0, 1.0). """ rs = generator._get_rand() return rs.random_sample(size)
def randint(low, high=None, size=None, dtype=int): """This function has the same `nlcpy.random.RandomState.randint` See Also -------- nlcpy.random.RandomState.randint : Returns random integers from low (inclusive) to high (exclusive). """ rs = generator._get_rand() return rs.randint(low, high, size, dtype)