Skip to content

Commit

Permalink
fix a scipy imort problem with binom test
Browse files Browse the repository at this point in the history
  • Loading branch information
bouromain committed Feb 29, 2024
1 parent 43176da commit e09836b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hippocampy/stats/stats.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import bottleneck as bn
import numpy as np
from scipy.optimize import curve_fit
from scipy.stats import binom_test
from scipy.stats import binomtest

################################################################################
# NON PARMETRIC
Expand Down Expand Up @@ -67,7 +67,7 @@ def sign_test(arr, mu: float = 0, alternative: str = "two-sided", p: float = 0.5
neg = bn.nansum(arr < 0)
M = (pos - neg) / 2

p_value = binom_test(
p_value = binomtest(
bn.nanmin([pos, neg]), pos + neg, p, alternative=alternative
).pvalue

Expand Down

0 comments on commit e09836b

Please sign in to comment.