neuroprob/point_process.py
def gen_IBP(intensity):
    """
    Sample of the Inhomogenous Bernoulli Process
    
    :param numpy.array intensity: intensity of the Bernoulli process at array index
    :returns: sample of binary variables with same shape as intensity
    :rtype: numpy.array
    """
    b = Bernoulli(torch.tensor(intensity))
    return b.sample().numpy()

    Sample of the Inhomogenous Bernoulli Process
    
    :param numpy.array intensity: intensity of the Bernoulli process at array index
    :returns: sample of binary variables with same shape as intensity
    :rtype: numpy.array
    
Sample of the Inhomogenous Bernoulli Process
Sample of the Inhomogenous Bernoulli Process
def gen_IBP(intensity):
    b = Bernoulli(torch.tensor(intensity))
    return b.sample().numpy()
def gen_IBP ( intensity ) : b = Bernoulli ( torch . tensor ( intensity ) ) return b . sample ( ) . numpy ( )
Sample of the Inhomogenous Bernoulli Process
Sample of the Inhomogenous Bernoulli Process
"""
    Sample of the Inhomogenous Bernoulli Process
    
    :param numpy.array intensity: intensity of the Bernoulli process at array index
    :returns: sample of binary variables with same shape as intensity
    :rtype: numpy.array
    """
sample of binary variables with same shape as intensity
sample of binary variables with same shape as intensity
numpy.array
intensity
intensity of the Bernoulli process at array index
intensity of the Bernoulli process at array index