Skip to content

Commit

Permalink
use already defined variable
Browse files Browse the repository at this point in the history
  • Loading branch information
aloctavodia committed Jan 19, 2021
1 parent 84b8f40 commit 8e94ed7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pymc3/distributions/bart.py
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ def predict(self, X_new):
pred = np.zeros((len(trees), num_observations))
np.random.randint(len(trees))
for draw, trees_to_sum in enumerate(trees):
new_Y = np.zeros(X_new.shape[0])
new_Y = np.zeros(num_observations)
for tree in trees_to_sum:
new_Y += [tree.predict_out_of_sample(x) for x in X_new]
pred[draw] = new_Y
Expand Down

0 comments on commit 8e94ed7

Please sign in to comment.