Permalink
Browse files

Fixed example to use verbose non-stuple slicing

  • Loading branch information...
1 parent 0484f16 commit dcfcd943c48d6d6d29f6cd6c2e567c1c2f486f43 @miketrumpis miketrumpis committed May 28, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 examples/inference_algs.py
View
4 examples/inference_algs.py
@@ -182,9 +182,7 @@ def calc_marginals_simple(cpts,evidence):
likelihood : likelihood of observations in the model
"""
joint_dist = multiply_potentials(*cpts)
- joint_dist = joint_dist[
- joint_dist.aix.johncalls[evidence['johncalls']].marycalls[evidence['marycalls']]
- ]
+ joint_dist = joint_dist.axis.johncalls[evidence['johncalls']].axis.marycalls[evidence['marycalls']]
return (dict((ax.name, normalize(sum_over_other_axes(joint_dist, ax.name)))
for ax in joint_dist.axes),
joint_dist.sum())

0 comments on commit dcfcd94

Please sign in to comment.