aboutsummaryrefslogtreecommitdiff
path: root/beliefs
diff options
context:
space:
mode:
authorCathy Yeh <cathy@driver.xyz>2017-12-08 16:01:37 -0800
committerCathy Yeh <cathy@driver.xyz>2017-12-11 18:50:00 -0800
commit06626854ca893b44c128ca333fb5623591134746 (patch)
tree7f18bde2c2cc31b7d13c50ff34c17182e8adaccc /beliefs
parent4373157138e85d2dbad9672cef5963a27a3d962c (diff)
downloadbeliefs-06626854ca893b44c128ca333fb5623591134746.tar.gz
beliefs-06626854ca893b44c128ca333fb5623591134746.tar.bz2
beliefs-06626854ca893b44c128ca333fb5623591134746.zip
tests for belief propagation with AND and mixed AND and OR nodes
Diffstat (limited to 'beliefs')
-rw-r--r--beliefs/factors/bernoulli_or_cpd.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/beliefs/factors/bernoulli_or_cpd.py b/beliefs/factors/bernoulli_or_cpd.py
index bfb3a95..162e156 100644
--- a/beliefs/factors/bernoulli_or_cpd.py
+++ b/beliefs/factors/bernoulli_or_cpd.py
@@ -25,7 +25,7 @@ class BernoulliOrCPD(TabularCPD):
@property
def values(self):
- if not any(self._values):
+ if len(self._values) == 0:
self._values = self._build_kwise_values_array(len(self.variables))
self._values = self._values.reshape(self.cardinality)
return self._values