Skip to content

Commit

Permalink
make waic return a Series (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
aloctavodia committed Apr 17, 2019
1 parent 1c1a236 commit bef6ac0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions arviz/stats/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1030,12 +1030,12 @@ def waic(data, pointwise=False, scale="deviance"):
the Observed RV in your model to make sure it returns element-wise logp.
"""
)
return pd.DataFrame(
[[waic_sum, waic_se, p_waic, warn_mg, waic_i, scale]],
columns=["waic", "waic_se", "p_waic", "warning", "waic_i", "waic_scale"],
return pd.Series(
data=[waic_sum, waic_se, p_waic, warn_mg, waic_i, scale],
index=["waic", "waic_se", "p_waic", "warning", "waic_i", "waic_scale"],
)
else:
return pd.DataFrame(
[[waic_sum, waic_se, p_waic, warn_mg, scale]],
columns=["waic", "waic_se", "p_waic", "warning", "waic_scale"],
return pd.Series(
data=[waic_sum, waic_se, p_waic, warn_mg, scale],
index=["waic", "waic_se", "p_waic", "warning", "waic_scale"],
)

0 comments on commit bef6ac0

Please sign in to comment.