Ejemplo n.º 1
0
def uniform_lpdf(node, sample, kw):
    rstate, shape, low, high = node.inputs
    rval = elemwise_cond(
        numpy.array(float('-inf')), sample < low,
        -tensor.log(high - low), sample <= high,
        numpy.array(float('-inf')))
    return rval
Ejemplo n.º 2
0
def random_integers_lpdf(node, sample, kw):
    rstate, shape, low, high = node.inputs

    # TODO: Check that sample is integer !

    rval = elemwise_cond(numpy.array(float('-inf')), sample < low,
                         -tensor.log(high - low + 1.), sample <= high,
                         numpy.array(float('-inf')))
    return rval
Ejemplo n.º 3
0
def random_integers_lpdf(node, sample, kw):
    rstate, shape, low, high = node.inputs

    # TODO: Check that sample is integer !

    rval = elemwise_cond(
        numpy.array(float('-inf')), sample < low,
        -tensor.log(high-low+1.), sample <= high,
        numpy.array(float('-inf')))
    return rval
Ejemplo n.º 4
0
def uniform_lpdf(node, sample, kw):
    rstate, shape, low, high = node.inputs
    rval = elemwise_cond(numpy.array(float('-inf')), sample < low,
                         -tensor.log(high - low), sample <= high,
                         numpy.array(float('-inf')))
    return rval