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
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
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
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