Merge pull request #10 from ocefpaf/scipy

Scipy
master
Per A. Brodtkorb 9 years ago
commit bd92802238

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<projectDescription> <projectDescription>
<name>svn_pywafo</name> <name>svn_pywafo</name>
<comment></comment> <comment></comment>
<projects> <projects>
</projects> </projects>
<buildSpec> <buildSpec>
<buildCommand> <buildCommand>
<name>org.python.pydev.PyDevBuilder</name> <name>org.python.pydev.PyDevBuilder</name>
<arguments> <arguments>
</arguments> </arguments>
</buildCommand> </buildCommand>
</buildSpec> </buildSpec>
<natures> <natures>
<nature>org.python.pydev.pythonNature</nature> <nature>org.python.pydev.pythonNature</nature>
</natures> </natures>
</projectDescription> </projectDescription>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?><pydev_project> <?eclipse-pydev version="1.0"?><pydev_project>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property> <pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property> <pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
</pydev_project> </pydev_project>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -3,7 +3,7 @@ from __future__ import division, print_function, absolute_import
import warnings import warnings
import numpy as np import numpy as np
from scipy.lib.six import callable from scipy._lib.six import callable
def binned_statistic(x, values, statistic='mean', def binned_statistic(x, values, statistic='mean',

@ -4,7 +4,7 @@
# #
from __future__ import division, print_function, absolute_import from __future__ import division, print_function, absolute_import
from scipy.lib.six import string_types, exec_ from scipy._lib.six import string_types, exec_
import sys import sys
import keyword import keyword
@ -2011,7 +2011,7 @@ class rv_continuous(rv_generic):
return output return output
def link(self, x, logSF, theta, i): def link(self, x, logSF, theta, i):
''' '''
Return theta[i] as function of quantile, survival probability and Return theta[i] as function of quantile, survival probability and
theta[j] for j!=i. theta[j] for j!=i.
@ -2034,7 +2034,7 @@ class rv_continuous(rv_generic):
theta[i] = link(x, logSF, theta, i), theta[i] = link(x, logSF, theta, i),
where logSF = log(Prob(X>x; theta)). where logSF = log(Prob(X>x; theta)).
See also See also
estimation.Profile estimation.Profile
''' '''
return self._link(x, logSF, theta, i) return self._link(x, logSF, theta, i)
@ -2288,7 +2288,7 @@ class rv_continuous(rv_generic):
# invert the Hessian matrix (i.e. invert the observed information number) # invert the Hessian matrix (i.e. invert the observed information number)
#pcov = -pinv(H); #pcov = -pinv(H);
return - H return - H
# return starting point for fit (shape arguments + loc + scale) # return starting point for fit (shape arguments + loc + scale)
def _fitstart(self, data, args=None): def _fitstart(self, data, args=None):

@ -7,7 +7,7 @@ import warnings
import numpy as np import numpy as np
from scipy.lib._version import NumpyVersion from scipy._lib._version import NumpyVersion
if NumpyVersion(np.__version__) > '1.7.0.dev': if NumpyVersion(np.__version__) > '1.7.0.dev':
_assert_warns = np.testing.assert_warns _assert_warns = np.testing.assert_warns

@ -23,7 +23,7 @@ from __future__ import division, print_function, absolute_import
import warnings import warnings
# Scipy imports. # Scipy imports.
from scipy.lib.six import callable, string_types from scipy._lib.six import callable, string_types
from scipy import linalg, special from scipy import linalg, special
from numpy import atleast_2d, reshape, zeros, newaxis, dot, exp, pi, sqrt, \ from numpy import atleast_2d, reshape, zeros, newaxis, dot, exp, pi, sqrt, \

@ -13,7 +13,7 @@ from numpy import (isscalar, r_, log, sum, around, unique, asarray,
floor, array, poly1d, compress, not_equal, pi, exp, ravel, angle) floor, array, poly1d, compress, not_equal, pi, exp, ravel, angle)
from numpy.testing.decorators import setastest from numpy.testing.decorators import setastest
from scipy.lib.six import string_types from scipy._lib.six import string_types
from ._numpy_compat import count_nonzero from ._numpy_compat import count_nonzero
from scipy import optimize from scipy import optimize
from scipy import special from scipy import special
@ -2066,7 +2066,7 @@ def median_test(*args, **kwds):
References References
---------- ----------
.. [1] Mood, A. M., Introduction to the Theory of Statistics. McGraw-Hill .. [1] Mood, A. M., Introduction to the Theory of Statistics. McGraw-Hill
(1950), pp. 394-399. (1950), pp. 394-399.
.. [2] Zar, J. H., Biostatistical Analysis, 5th ed. Prentice Hall (2010). .. [2] Zar, J. H., Biostatistical Analysis, 5th ed. Prentice Hall (2010).
See Sections 8.12 and 10.15. See Sections 8.12 and 10.15.
@ -2100,7 +2100,7 @@ def median_test(*args, **kwds):
[11, 5, 10]]) [11, 5, 10]])
`p` is too large to conclude that the medians are not the same: `p` is too large to conclude that the medians are not the same:
>>> p >>> p
0.12609082774093244 0.12609082774093244
@ -2120,7 +2120,7 @@ def median_test(*args, **kwds):
>>> tbl >>> tbl
array([[ 5, 11, 9], array([[ 5, 11, 9],
[11, 4, 8]]) [11, 4, 8]])
This example demonstrates that if the data set is not large and there This example demonstrates that if the data set is not large and there
are values equal to the median, the p-value can be sensitive to the are values equal to the median, the p-value can be sensitive to the

@ -40,7 +40,7 @@ from numpy import ndarray
import numpy.ma as ma import numpy.ma as ma
from numpy.ma import masked, nomask from numpy.ma import masked, nomask
from scipy.lib.six import iteritems from scipy._lib.six import iteritems
import itertools import itertools
import warnings import warnings

@ -171,13 +171,13 @@ from __future__ import division, print_function, absolute_import
import warnings import warnings
import math import math
from scipy.lib.six import xrange from scipy._lib.six import xrange
# friedmanchisquare patch uses python sum # friedmanchisquare patch uses python sum
pysum = sum # save it before it gets overwritten pysum = sum # save it before it gets overwritten
# Scipy imports. # Scipy imports.
from scipy.lib.six import callable, string_types from scipy._lib.six import callable, string_types
from numpy import array, asarray, ma, zeros, sum from numpy import array, asarray, ma, zeros, sum
import scipy.special as special import scipy.special as special
import scipy.linalg as linalg import scipy.linalg as linalg

@ -6,7 +6,7 @@ import warnings
import numpy as np import numpy as np
import numpy.testing as npt import numpy.testing as npt
from scipy.lib._version import NumpyVersion from scipy._lib._version import NumpyVersion
from wafo import stats from wafo import stats

@ -2,7 +2,7 @@ from __future__ import division, print_function, absolute_import
import numpy.testing as npt import numpy.testing as npt
import numpy as np import numpy as np
from scipy.lib.six import xrange from scipy._lib.six import xrange
from wafo import stats from wafo import stats
from wafo.stats.tests.common_tests import (check_normalization, check_moment, from wafo.stats.tests.common_tests import (check_normalization, check_moment,

@ -15,7 +15,7 @@ from nose import SkipTest
import numpy import numpy
import numpy as np import numpy as np
from numpy import typecodes, array from numpy import typecodes, array
from scipy.lib._version import NumpyVersion from scipy._lib._version import NumpyVersion
from scipy import special from scipy import special
import wafo.stats as stats import wafo.stats as stats
from wafo.stats._distn_infrastructure import argsreduce from wafo.stats._distn_infrastructure import argsreduce
@ -512,7 +512,7 @@ class TestGenpareto(TestCase):
assert_allclose(rv.logpdf(1), 0) assert_allclose(rv.logpdf(1), 0)
def test_x_inf(self): def test_x_inf(self):
# make sure x=inf is handled gracefully # make sure x=inf is handled gracefully
rv = stats.genpareto(c=0.1) rv = stats.genpareto(c=0.1)
assert_allclose([rv.pdf(np.inf), rv.cdf(np.inf)], [0., 1.]) assert_allclose([rv.pdf(np.inf), rv.cdf(np.inf)], [0., 1.])
assert_(np.isneginf(rv.logpdf(np.inf))) assert_(np.isneginf(rv.logpdf(np.inf)))

Loading…
Cancel
Save