def log_post_trace(trace, model):
 return np.vstack(([obs.logp_elemwise(pt) for obs in model.observed_RVs] for pt in trace))

def log_post_trace ( trace , model ) : return np . vstack ( ( [ obs . logp_elemwise ( pt ) for obs in model . observed_RVs ] for pt in trace ) )
calculate the elementwise log-posterior for the sampled trace .