예제 #1
0
파일: sample.py 프로젝트: SX-Aurora/nlcpy
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)
예제 #2
0
파일: sample.py 프로젝트: SX-Aurora/nlcpy
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)
예제 #3
0
파일: sample.py 프로젝트: SX-Aurora/nlcpy
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)
예제 #4
0
파일: sample.py 프로젝트: SX-Aurora/nlcpy
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)
예제 #5
0
파일: sample.py 프로젝트: SX-Aurora/nlcpy
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)