Skip to content

Commit

Permalink
Merge branch 'master' into fix_warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelvallat authored Nov 11, 2023
2 parents f7c8905 + 3cce731 commit 058ed83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pingouin/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def normality(data, dv=None, group=None, method="shapiro", alpha=0.05):
if tmp[dv].count() <= 3:
warnings.warn(f"Group {idx} has less than 4 valid samples. Returning NaN.")
st_grp = pd.DataFrame(
{"W": np.nan, "pval": np.nan, "normal": "False"}, index=[idx]
{"W": np.nan, "pval": np.nan, "normal": False}, index=[idx]
)
else:
st_grp = normality(tmp[dv].to_numpy(), method=method, alpha=alpha)
Expand Down
2 changes: 1 addition & 1 deletion pingouin/tests/test_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def test_normality(self):
stats = normality(df_small, dv="variable", group="group")
assert np.isnan(stats.loc[[1, 3], "pval"]).all()
assert not np.isnan(stats.loc[[0, 2], "pval"]).all()
assert (stats.loc[[1, 3], "normal"] == "False").all()
assert (~stats.loc[[1, 3], "normal"]).all()

def test_homoscedasticity(self):
"""Test function test_homoscedasticity."""
Expand Down

0 comments on commit 058ed83

Please sign in to comment.