示例#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
示例#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
示例#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
示例#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