moved test/test_dispersion_relation.py to the wave_theory/test

master
Per.Andreas.Brodtkorb 12 years ago
parent 6121ccdea1
commit 7b806924f1

@ -1674,7 +1674,7 @@ class SpecData1D(PlotData):
f = wafodata();
f = PlotData();
# f.options = options;
# if defnr>1 or defnr==-2:
# f.u = utc # save level u

@ -192,9 +192,11 @@ def test_bandwidth():
>>> S.bandwidth([0,1,2,3])
array([ 0.65354446, 0.3975428 , 0.75688813, 2.00207912])
'''
def main():
def test_docstrings():
import doctest
doctest.testmod()
if __name__ == '__main__':
main()
#from nose.plugins.plugintest import run_buffered as run
#run()
test_docstrings()

@ -2135,8 +2135,8 @@ class rv_continuous(rv_generic):
arguments relevant for a given distribution.
"""
loc = kwds.get('loc', 0)
scale = kwds.get('scale', 1)
loc = kwds.get('loc', None)
scale = kwds.get('scale', None)
args, loc, scale = self.fix_loc_scale(args, loc, scale)
if not (self._argcheck(*args) and (scale > 0)):
return nan
@ -3195,8 +3195,8 @@ class cauchy_gen(rv_continuous):
return inf, inf, nan, nan
def _entropy(self):
return log(4*pi)
def _fitstart(data, args=None):
return (0, 1)
def _fitstart(self, data, args=None):
return (0, 1)
cauchy = cauchy_gen(name='cauchy')
@ -7591,7 +7591,7 @@ class rv_discrete(rv_generic):
else:
invfac = 1.0
tot = 0.0
# tot = 0.0
low, upp = self._ppf(0.001, *args), self._ppf(0.999, *args)
low = max(min(-suppnmin, low), lb)
upp = min(max(suppnmin, upp), ub)
@ -8384,8 +8384,11 @@ def test_truncrayleigh():
#Compare ML and MPS method
phat = truncrayleigh.fit2(R, method='ml');
def test_doctstrings():
def test_docstrings():
import doctest
doctest.testmod()
def test_script():
import matplotlib
matplotlib.interactive(True)
R = norm.rvs(size=100)

@ -4,7 +4,7 @@ Created on 19. juli 2010
@author: pab
'''
from wafo.spectrum.dispersion_relation import w2k,k2w #@UnusedImport
from wafo.wave_theory.dispersion_relation import w2k,k2w #@UnusedImport
def test_k2w():
'''
Loading…
Cancel
Save