Skip to content

Commit 8c6963d

Browse files
committed
simplify condition
1 parent c2de9fb commit 8c6963d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pymc_bart/pgbart.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -528,9 +528,7 @@ def fast_linear_fit(
528528

529529
x_var = x_diff @ x_diff.T
530530

531-
if x_var == 0:
532-
b = np.zeros(1)
533-
else:
531+
if x_var != 0:
534532
b = (x_diff @ y_diff.T) / x_var
535533

536534
a = ybar - b * xbar

0 commit comments

Comments
 (0)