diff options
author | Cathy Yeh <cathy@driver.xyz> | 2017-12-08 16:01:37 -0800 |
---|---|---|
committer | Cathy Yeh <cathy@driver.xyz> | 2017-12-11 18:50:00 -0800 |
commit | 06626854ca893b44c128ca333fb5623591134746 (patch) | |
tree | 7f18bde2c2cc31b7d13c50ff34c17182e8adaccc /beliefs/factors | |
parent | 4373157138e85d2dbad9672cef5963a27a3d962c (diff) | |
download | beliefs-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/factors')
-rw-r--r-- | beliefs/factors/bernoulli_or_cpd.py | 2 |
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 |