Skip to content

Commit

Permalink
Merge pull request #4809 from argriffing/cauchy-moments
Browse files Browse the repository at this point in the history
MAINT: cauchy moments are undefined
  • Loading branch information
ev-br committed Aug 25, 2015
2 parents 5c9f1cf + 7a95782 commit 7fe3d47
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scipy/stats/_continuous_distns.py
Expand Up @@ -732,7 +732,7 @@ def _isf(self, q):
return tan(pi/2.0-pi*q)

def _stats(self):
return inf, inf, nan, nan
return nan, nan, nan, nan

def _entropy(self):
return log(4*pi)
Expand Down
4 changes: 2 additions & 2 deletions scipy/stats/tests/test_continuous_basic.py
Expand Up @@ -229,9 +229,9 @@ def test_moments():

def check_sample_meanvar_(distfn, arg, m, v, sm, sv, sn, msg):
# this did not work, skipped silently by nose
if not np.isinf(m):
if np.isfinite(m):
check_sample_mean(sm, sv, sn, m)
if not np.isinf(v):
if np.isfinite(v):
check_sample_var(sv, sn, v)


Expand Down

0 comments on commit 7fe3d47

Please sign in to comment.