Skip to content

Commit

Permalink
Hot fix for conditional_mixture_gaussian_node
Browse files Browse the repository at this point in the history
Note that w can be either list or np.nan
  • Loading branch information
Roman223 authored Oct 11, 2023
1 parent 8a862a2 commit f67ba4d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bamt/nodes/conditional_mixture_gaussian_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,9 @@ def choose(
pvals: parent values
"""
mean, covariance, w = self.get_dist(node_info, pvals)

if np.isnan(w):

# check if w is nan or list of weights
if not isinstance(w, list):
return np.nan

n_comp = len(w)
Expand Down

0 comments on commit f67ba4d

Please sign in to comment.