def random_bounded_bool_fill(bitgen, low, rng, size, dtype):
    """
    Returns a new array of given size with boolean values.
    """
    buf = 0
    bcnt = 0
    out = np.empty(size, dtype=dtype)
    for i in np.ndindex(size):
        val, bcnt, buf = buffered_bounded_bool(bitgen, low, rng, bcnt, buf)
        out[i] = low + val
    return out

    Returns a new array of given size with boolean values.
    
numba/np/random/new_random_methods.py