Skip to content

Commit

Permalink
Small adjustments - tidy up
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Sep 13, 2023
1 parent a663f34 commit 0619e22
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions crick/stats_stubs.c
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ CRICK_INLINE double stats_std(stats_t *T, long ddof) {

CRICK_INLINE double stats_skew(stats_t *T, int bias) {
double n, m2, m3, skew;
if (T->count < 2 || T->homogeneous) return NPY_NAN;
if (T->homogeneous) return NPY_NAN;
n = T->count;
m2 = T->m2 / T->count;
m3 = T->m3 / T->count;
Expand All @@ -125,7 +125,7 @@ CRICK_INLINE double stats_skew(stats_t *T, int bias) {

CRICK_INLINE double stats_kurt(stats_t *T, int fisher, int bias) {
double n, m2, m4, kurt;
if (T->count < 2 || T->homogeneous) return NPY_NAN;
if (T->homogeneous) return NPY_NAN;
n = T->count;
m2 = T->m2 / T->count;
m4 = T->m4 / T->count;
Expand Down
4 changes: 2 additions & 2 deletions crick/tests/test_stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def test_basic_stats(x):
normal,
empty,
one,
pytest.param(duplicate),
duplicate,
different,
],
)
Expand All @@ -69,7 +69,7 @@ def test_skew(x, bias):
normal,
empty,
one,
pytest.param(duplicate),
duplicate,
different,
],
)
Expand Down

0 comments on commit 0619e22

Please sign in to comment.