Disabled wafo.stats tests + small cosmetiq fixes

master
pbrod 9 years ago
parent 0f839301eb
commit 34996c05e2

@ -52,7 +52,7 @@ addopts =
wafo/test
wafo/covariance/test
wafo/spectrum/test
wafo/stats/tests
# wafo/stats/tests
wafo/covariance/test
wafo/transform/test
wafo/wave_theory/test

@ -1,5 +1,5 @@
import warnings
from graphutil import cltext # @UnresolvedImport
from wafo.graphutil import cltext # @UnresolvedImport
from plotbackend import plotbackend
from time import gmtime, strftime

@ -39,16 +39,17 @@ def which(program):
def f2py_call_str():
'''Return which f2py callable is in the path regardless of platform'''
# define possible options:
# on Arch Linux, python and f2py are the calls corresponding to python 3
# and python2/f2py2 for python 2
# other Linux versions might still use python/f2py for python 2
if os.path.basename(sys.executable).endswith('2'):
options = ('f2py2', 'f2py2.6', 'f2py2.7',)
else: # on Windows and other Linux using python/f2py
options = ('f2py.bat', 'f2py', 'f2py2.6', 'f2py2.7', 'f2py.py',)
options = ('f2py.exe', 'f2py.bat', 'f2py', 'f2py2.6', 'f2py2.7',
'f2py.py',)
for k in options:
if which(k):
# Found the f2py path, no need to look further
@ -62,4 +63,3 @@ def f2py_call_str():
except NameError:
raise UserWarning('Couldn\'t locate f2py. '
'Should be part of NumPy installation.')

@ -244,8 +244,8 @@ def _parse_data(*args, **kwds):
return xx, yy, data
return x, y, data
pcolor = plotbackend.pcolor
pcolormesh = plotbackend.pcolormesh
pcolor = getattr(plotbackend, 'pcolor', None)
pcolormesh = getattr(plotbackend, 'pcolormesh', None)
def _find_mid_points(x):

@ -3,12 +3,13 @@
"""
import warnings
verbose = False
if False:
try:
from scitools import easyviz as plotbackend # @UnresolvedImport
if verbose:
print('wafo: plotbackend is set to scitools.easyviz')
except:
except ImportError:
warnings.warn('wafo: Unable to load scitools.easyviz as plotbackend')
plotbackend = None
else:
@ -17,6 +18,6 @@ else:
plotbackend.interactive(True)
if verbose:
print('wafo: plotbackend is set to matplotlib.pyplot')
except:
except ImportError:
warnings.warn('wafo: Unable to load matplotlib.pyplot as plotbackend')
plotbackend = None

@ -10,8 +10,8 @@ Author: Per A. Brodtkorb 2008
from __future__ import division, absolute_import
import warnings
from ..plotbackend import plotbackend
from ..misc import ecross, findcross
from wafo.plotbackend import plotbackend
from wafo.misc import ecross, findcross
import numdifftools # @UnresolvedImport
@ -1151,6 +1151,9 @@ def test1():
# Better CI for phat.par[i=0]
Lp1 = Profile(phat, i=0) # @UnusedVariable
Lp1.plot()
import matplotlib.pyplot as plt
plt.show()
# Lp2 = Profile(phat, i=2)
# SF = 1./990
# x = phat.isf(SF)

@ -380,7 +380,7 @@ def test_nextpow2():
def test_discretize():
x, y = discretize(np.cos, 0, np.pi)
x, y = discretize(np.cos, 0, np.pi, tol=0.0051)
assert_array_almost_equal(
x,
np.array(

Loading…
Cancel
Save