def _sample(probability_vec):
    """Return random binary string, with given probabilities."""
    return map(int,
               numpy.random.random(probability_vec.size) <= probability_vec)
def _sample ( probability_vec ) : return map ( int , numpy . random . random ( probability_vec . size ) <= probability_vec )
Return random binary string, with given probabilities.