Skip to content

Commit 43669e1

Browse files
author
FA Saad
committed
Mark unused variables and line break in Normal.
1 parent e4bd6c2 commit 43669e1

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/primitives/normal.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,17 @@ def is_numeric():
164164

165165
@staticmethod
166166
def calc_predictive_logp(x, N, sum_x, sum_x_sq, m, r, s, nu):
167-
mn, rn, sn, nun = Normal.posterior_hypers(
167+
_mn, rn, sn, nun = Normal.posterior_hypers(
168168
N, sum_x, sum_x_sq, m, r, s, nu)
169-
mm, rm, sm, num = Normal.posterior_hypers(
169+
_mm, rm, sm, num = Normal.posterior_hypers(
170170
N+1, sum_x+x, sum_x_sq+x*x, m, r, s, nu)
171171
ZN = Normal.calc_log_Z(rn, sn, nun)
172172
ZM = Normal.calc_log_Z(rm, sm, num)
173173
return -.5 * LOG2PI + ZM - ZN
174174

175175
@staticmethod
176176
def calc_logpdf_marginal(N, sum_x, sum_x_sq, m, r, s, nu):
177-
mn, rn, sn, nun = Normal.posterior_hypers(
177+
_mn, rn, sn, nun = Normal.posterior_hypers(
178178
N, sum_x, sum_x_sq, m, r, s, nu)
179179
Z0 = Normal.calc_log_Z(r, s, nu)
180180
ZN = Normal.calc_log_Z(rn, sn, nun)
@@ -186,7 +186,8 @@ def posterior_hypers(N, sum_x, sum_x_sq, m, r, s, nu):
186186
nun = nu + float(N)
187187
mn = (r*m + sum_x)/rn
188188
sn = s + sum_x_sq + r*m*m - rn*mn*mn
189-
if sn == 0: sn = s
189+
if sn == 0:
190+
sn = s
190191
return mn, rn, sn, nun
191192

192193
@staticmethod

0 commit comments

Comments
 (0)