Skip to content

Commit

Permalink
Merge branch 'pr/4725'
Browse files Browse the repository at this point in the history
Reviewed at #4725
  • Loading branch information
ev-br committed Apr 14, 2015
2 parents c0f54db + a7ded12 commit 4f65e8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scipy/stats/_continuous_distns.py
Expand Up @@ -2039,7 +2039,8 @@ def _ppf(self, q, a, c):
return where(cond > 0, val1**ic, val2**ic)

def _munp(self, n, a, c):
return special.gamma(a+n*1.0/c) / special.gamma(a)
# Pochhammer symbol: poch(a,n) = gamma(a+n)/gamma(a)
return special.poch(a, n*1.0/c)

def _entropy(self, a, c):
val = special.psi(a)
Expand Down
6 changes: 6 additions & 0 deletions scipy/stats/tests/test_distributions.py
Expand Up @@ -1858,6 +1858,12 @@ def test_gengamma_edge():
p = stats.gengamma.pdf(0, 1, 1)
assert_equal(p, 1.0)

# Regression tests for gh-4724.
p = stats.gengamma._munp(-2, 200, 1.)
assert_almost_equal(p, 1./199/198)

p = stats.gengamma._munp(-2, 10, 1.)
assert_almost_equal(p, 1./9/8)

def test_ksone_fit_freeze():
# Regression test for ticket #1638.
Expand Down

0 comments on commit 4f65e8e

Please sign in to comment.