PyWavelets / pywt

PyWavelets - Wavelet Transforms in Python
http://pywavelets.readthedocs.org
MIT License
2.04k stars 470 forks source link

Tests fail on ppc64le #508

Open ignatenkobrain opened 5 years ago

ignatenkobrain commented 5 years ago

Hello,

I noticed that quite some tests failed on ppc64le architecture. They are below. I guess it is because only this architecture enables FMA (more precise floating point).

======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -1.39349318e+00,   8.43433380e-01,  -7.48389721e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau1, Length: 1000, rms=0.686
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -1.39349318e+00,   8.43433380e-01,  -7.48389721e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau1, Length: 1000, rms=0.616
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 0.4117236 , -0.9451905 ,  0.87268806, ..., -0.90264845,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau1, Length: 1001, rms=0.679
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 0.4117236 , -0.9451905 ,  0.87268806, ..., -0.90264845,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau1, Length: 1001, rms=0.607
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  1.12917554e+00,   7.61276960e-01,  -5.71408331e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau2, Length: 1000, rms=0.0177
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  1.12917554e+00,   7.61276960e-01,  -5.71408331e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau2, Length: 1000, rms=0.148
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 0.30998278, -2.0600197 ,  0.52508765, ..., -0.45352477,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau2, Length: 1001, rms=0.00928
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 0.30998278, -2.0600197 ,  0.52508765, ..., -0.45352477,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau2, Length: 1001, rms=0.0879
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -8.93147662e-02,   1.37662664e-01,  -1.15353489e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau3, Length: 1000, rms=0.672
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -8.93147662e-02,   1.37662664e-01,  -1.15353489e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau3, Length: 1000, rms=0.549
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-1.1007701,  2.5073488, -0.5190495, ...,  1.5798675, -1.1528466,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau3, Length: 1001, rms=0.659
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-1.1007701,  2.5073488, -0.5190495, ...,  1.5798675, -1.1528466,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau3, Length: 1001, rms=0.492
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  2.19198108e+00,   1.46006954e+00,   4.92554486e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau4, Length: 1000, rms=0.000395
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  2.19198108e+00,   1.46006954e+00,   4.92554486e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau4, Length: 1000, rms=0.00912
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 1.6859294 ,  0.92365026, -1.0816365 , ..., -0.6894008 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau4, Length: 1001, rms=1.51e-05
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 1.6859294 ,  0.92365026, -1.0816365 , ..., -0.6894008 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau4, Length: 1001, rms=0.0148
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  2.93289512e-01,  -6.61864221e-01,   9.51208472e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau5, Length: 1000, rms=0.525
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  2.93289512e-01,  -6.61864221e-01,   9.51208472e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau5, Length: 1000, rms=0.401
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 0.95373523, -0.02066549, -0.32827958, ...,  0.5075747 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau5, Length: 1001, rms=0.522
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 0.95373523, -0.02066549, -0.32827958, ...,  0.5075747 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau5, Length: 1001, rms=0.418
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  2.18554640e+00,   3.01264793e-01,  -2.68681925e-02,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau6, Length: 1000, rms=0.00206
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  2.18554640e+00,   3.01264793e-01,  -2.68681925e-02,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau6, Length: 1000, rms=0.00189
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-0.6568174 ,  0.5837318 , -0.8874696 , ..., -0.30613202,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau6, Length: 1001, rms=0.00118
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-0.6568174 ,  0.5837318 , -0.8874696 , ..., -0.30613202,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau6, Length: 1001, rms=0.0163
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -4.26712751e-01,   1.58191061e+00,  -1.27266502e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau7, Length: 1000, rms=0.314
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -4.26712751e-01,   1.58191061e+00,  -1.27266502e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau7, Length: 1000, rms=0.288
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 1.043287  ,  0.98668516,  0.37243325, ...,  1.3824416 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau7, Length: 1001, rms=0.311
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 1.043287  ,  0.98668516,  0.37243325, ...,  1.3824416 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau7, Length: 1001, rms=0.269
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -9.77049410e-01,  -9.58588789e-04,  -1.39527047e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau8, Length: 1000, rms=0.00383
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -9.77049410e-01,  -9.58588789e-04,  -1.39527047e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau8, Length: 1000, rms=0.00839
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 0.22625187, -0.26039404, -0.42945385, ..., -1.4728309 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau8, Length: 1001, rms=0.00227
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ 0.22625187, -0.26039404, -0.42945385, ..., -1.4728309 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cgau8, Length: 1001, rms=0.0132
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  1.19172287e+00,   1.43379402e+00,   2.10968089e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: shan, Length: 1000, rms=0.0013
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  1.19172287e+00,   1.43379402e+00,   2.10968089e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: shan, Length: 1000, rms=0.000279
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-1.1362303 , -0.45133784, -0.2946455 , ..., -1.3849694 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: shan, Length: 1001, rms=0.000776
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-1.1362303 , -0.45133784, -0.2946455 , ..., -1.3849694 ,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: shan, Length: 1001, rms=0.000328
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -1.05469847e+00,   1.15252875e-01,  -1.31572294e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: fbsp, Length: 1000, rms=0.0013
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([ -1.05469847e+00,   1.15252875e-01,  -1.31572294e+00,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: fbsp, Length: 1000, rms=0.00431
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-0.8017116 ,  0.46081898, -1.1515336 , ...,  0.37662926,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: fbsp, Length: 1001, rms=0.00976
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-0.8017116 ,  0.46081898, -1.1515336 , ...,  0.37662926,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: fbsp, Length: 1001, rms=0.0311
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  2.22936139e-01,   2.80852342e+00,  -7.33343661e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cmor, Length: 1000, rms=0.000955
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([  2.22936139e-01,   2.80852342e+00,  -7.33343661e-01,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cmor, Length: 1000, rms=0.00783
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-0.23254669, -1.6944844 ,  0.63337666, ...,  0.78298426,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cmor, Length: 1001, rms=0.00574
======================================================================
FAIL: test_matlab_compatibility_cwt.test_accuracy_precomputed_cwt(array([-0.23254669, -1.6944844 ,  0.63337666, ...,  0.78298426,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/builddir/build/BUILDROOT/python-pywt-1.0.1-4.fc31.ppc64le/usr/lib64/python3.7/site-packages/pywt/tests/test_matlab_compatibility_cwt.py", line 175, in _check_accuracy
    assert_(rms < epsilon, msg=msg)
  File "/usr/lib64/python3.7/site-packages/numpy/testing/_private/utils.py", line 96, in assert_
    raise AssertionError(smsg)
AssertionError: [RMS > EPSILON] for Scale: [1 2], Wavelet: cmor, Length: 1001, rms=0.0175
BUILDSTDERR: -error: Bad exit status from /var/tmp/rpm-tmp.GvFw9u (%check)
---------------------------------------------------------------------
grlee77 commented 5 years ago

Thanks for reporting this. Was this vs. the 1.0.1 release? I don't expect current master will be different, but maybe worth trying.

It looks like all of these failures are in the test cases that compare the output of cwt to precomputed values. It looks like the rms values reported are MUCH larger than the tolerances, so it does not seem like a simple case of just needing to back off slightly on the tolerance in the tests.

ignatenkobrain commented 5 years ago

Yes, this was with 1.0.1.

grlee77 commented 5 years ago

The other thing that stands out from those failures is that they appear to occur only for the complex-valued continuous wavelets. None of the real-valued ones show up in that log.

Have you verified that NumPy itself is passing its tests? The cwt implementation is mostly just calling NumPy functions, specifically numpy.convolve.

eclipseo commented 5 years ago

There is one test failing on ppc64le for Numpy 1.17, but is related to numpy.einsum so I don't think this is related to these tests.

opoplawski commented 4 years ago

With 1.1.1 we seem to be down to the following test failures on ppc64le:

=================================== FAILURES ===================================
_____________________ test_cwt_complex[float64-1e-13-conv] _____________________
dtype = <class 'numpy.float64'>, tol = 1e-13, method = 'conv'
    @pytest.mark.parametrize('dtype, tol, method',
                             [(np.float32, 1e-5, 'conv'),
                              (np.float32, 1e-5, 'fft'),
                              (np.float64, 1e-13, 'conv'),
                              (np.float64, 1e-13, 'fft')])
    def test_cwt_complex(dtype, tol, method):
        time, sst = pywt.data.nino()
        sst = np.asarray(sst, dtype=dtype)
        dt = time[1] - time[0]
        wavelet = 'cmor1.5-1.0'
        scales = np.arange(1, 32)

        # real-valued tranfsorm as a reference
        [cfs, f] = pywt.cwt(sst, scales, wavelet, dt, method=method)

        # verify same precision
        assert_equal(cfs.real.dtype, sst.dtype)

        # complex-valued transform equals sum of the transforms of the real
        # and imaginary components
        sst_complex = sst + 1j*sst
        [cfs_complex, f] = pywt.cwt(sst_complex, scales, wavelet, dt,
                                    method=method)
>       assert_allclose(cfs + 1j*cfs, cfs_complex, atol=tol, rtol=tol)
E       AssertionError: 
E       Not equal to tolerance rtol=1e-13, atol=1e-13
E       
E       Mismatched elements: 8184 / 8184 (100%)
E       Max absolute difference: 1.6260850453446392
E       Max relative difference: 12.401794291785068
E        x: array([[-0.022052+0.030137j, -0.018349+0.007132j, -0.078264+0.069763j, ...,
E                0.074812-0.099818j, -0.017838-0.003138j, -0.059956+0.043232j],
E              [-0.216809+0.179627j,  0.224426-0.229889j, -0.154184+0.204049j, ...,...
E        y: array([[-0.022052+0.026094j, -0.018349+0.01274j , -0.078264+0.074014j, ...,
E                0.074812-0.093232j, -0.017838+0.007649j, -0.059956+0.038912j],
E              [-0.216809+0.198218j,  0.224426-0.227157j, -0.154184+0.179117j, ...,...
pywt/tests/test_cwt_wavelets.py:371: AssertionError
_____________________________ test_cwt_method_fft ______________________________
    def test_cwt_method_fft():
        rstate = np.random.RandomState(1)
        data = rstate.randn(50)
        data[15] = 1.
        scales = np.arange(1, 64)
        wavelet = 'cmor1.5-1.0'

        # build a reference cwt with the legacy np.conv() method
        cfs_conv, _ = pywt.cwt(data, scales, wavelet, method='conv')

        # compare with the fft based convolution
        cfs_fft, _ = pywt.cwt(data, scales, wavelet, method='fft')
>       assert_allclose(cfs_conv, cfs_fft, rtol=0, atol=1e-13)
E       AssertionError: 
E       Not equal to tolerance rtol=0, atol=1e-13
E       
E       Mismatched elements: 3000 / 3150 (95.2%)
E       Max absolute difference: 0.8902320255282511
E       Max relative difference: 3.8545247710132533
E        x: array([[-0.018290-0.0411j  , -0.013562+0.109078j,  0.014260+0.081553j, ...,
E               -0.020773-0.101545j, -0.014319+0.060749j,  0.007514+0.049972j],
E              [ 0.035162-0.408651j, -0.016188+0.489424j,  0.021840-0.541804j, ...,...
E        y: array([[-0.018290-0.0411j  , -0.013562+0.109078j,  0.014260+0.081553j, ...,
E               -0.020773-0.101545j, -0.014319+0.060749j,  0.007514+0.049972j],
E              [ 0.035162-0.408651j, -0.016188+0.489424j,  0.021840-0.541804j, ...,...
pywt/tests/test_cwt_wavelets.py:433: AssertionError
=========================== short test summary info ============================
FAILED pywt/tests/test_cwt_wavelets.py::test_cwt_complex[float64-1e-13-conv]
FAILED pywt/tests/test_cwt_wavelets.py::test_cwt_method_fft - AssertionError: 
============= 2 failed, 227 passed, 2 skipped in 131.24s (0:02:11) =============

Other architectures appear to be fine.

opoplawski commented 2 years ago

Building pywt 1.3.0 on Fedora rawhide fails on ppc64le with the following test:

________________________ test_accuracy_precomputed_cwt _________________________
    @uses_precomputed  # skip this case if pymatbridge + Matlab are being used
    @pytest.mark.slow
    def test_accuracy_precomputed_cwt():
        # Keep this specific random seed to match the precomputed Matlab result.
        rstate = np.random.RandomState(1234)
        # has to be improved
        epsilon = 2e-15
        epsilon32 = 1e-5
        epsilon_psi = 1e-15
        for wavelet in wavelets:
            with warnings.catch_warnings():
                warnings.simplefilter('ignore', FutureWarning)
                w = pywt.ContinuousWavelet(wavelet)
                w32 = pywt.ContinuousWavelet(wavelet,dtype=np.float32)
            psi = _load_matlab_result_psi(wavelet)
            _check_accuracy_psi(w, psi, wavelet, epsilon_psi)

            for N in _get_data_sizes(w):
                data = rstate.randn(N)
                data32 = data.astype(np.float32)
                scales_count = 0
                for scales in _get_scales(w):
                    scales_count += 1
                    coefs = _load_matlab_result(data, wavelet, scales_count)
>                   _check_accuracy(data, w, scales, coefs, wavelet, epsilon)
pywt/tests/test_matlab_compatibility_cwt.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
data = array([ -1.39349312e+00,   8.43433358e-01,  -7.48389740e-01,
         6.96962461e-01,  -2.31877711e-02,   3.14787623e-....61324483e+00,  -2.62751782e-03,
         2.24986089e+00,  -1.20909849e+00,   5.33308212e-02,
         2.85267990e+00])
w = pywt._extensions._pywt.ContinuousWavelet(name='cgau1'), scales = 1
coefs = array([[  5.88904952e-01 -4.22675773e-01j,
         -1.02734763e+00 +2.40005860e-02j,
          5.28246856e-01 +1.4842....74440177e+00 +1.48754656e-01j,
         -7.16701910e-01 -1.17576867e+00j,
         -1.58277318e+00 +7.72076610e-01j]])
wavelet = 'cgau1', epsilon = 2e-15
    def _check_accuracy(data, w, scales, coefs, wavelet, epsilon):
        # PyWavelets result
        coefs_pywt, freq = pywt.cwt(data, scales, w)

        # coefs from Matlab are from R2012a which is missing the complex conjugate
        # as shown in Eq. 2 of Torrence and Compo. We take the complex conjugate of
        # the precomputed Matlab result to account for this.
        coefs = np.conj(coefs)

        # calculate error measures
        err = coefs_pywt - coefs
        rms = np.real(np.sqrt(np.mean(np.conj(err) * err)))

        msg = ('[RMS > EPSILON] for Scale: %s, Wavelet: %s, '
               'Length: %d, rms=%.3g' % (scales, wavelet, len(data), rms))
>       assert_(rms < epsilon, msg=msg)
E       AssertionError: [RMS > EPSILON] for Scale: 1, Wavelet: cgau1, Length: 1000, rms=0.398
pywt/tests/test_matlab_compatibility_cwt.py:161: AssertionError
opoplawski commented 2 years ago

These tests also still fail on ppc64le:

_____________________ test_cwt_complex[float64-1e-13-conv] _____________________
dtype = <class 'numpy.float64'>, tol = 1e-13, method = 'conv'
    @pytest.mark.parametrize('dtype, tol, method',
                             [(np.float32, 1e-5, 'conv'),
                              (np.float32, 1e-5, 'fft'),
                              (np.float64, 1e-13, 'conv'),
                              (np.float64, 1e-13, 'fft')])
    def test_cwt_complex(dtype, tol, method):
        time, sst = pywt.data.nino()
        sst = np.asarray(sst, dtype=dtype)
        dt = time[1] - time[0]
        wavelet = 'cmor1.5-1.0'
        scales = np.arange(1, 32)

        # real-valued tranfsorm as a reference
        [cfs, f] = pywt.cwt(sst, scales, wavelet, dt, method=method)

        # verify same precision
        assert_equal(cfs.real.dtype, sst.dtype)

        # complex-valued transform equals sum of the transforms of the real
        # and imaginary components
        sst_complex = sst + 1j*sst
        [cfs_complex, f] = pywt.cwt(sst_complex, scales, wavelet, dt,
                                    method=method)
>       assert_allclose(cfs + 1j*cfs, cfs_complex, atol=tol, rtol=tol)
E       AssertionError: 
E       Not equal to tolerance rtol=1e-13, atol=1e-13
E       
E       Mismatched elements: 8184 / 8184 (100%)
E       Max absolute difference: 1.6051954624814788
E       Max relative difference: 54.176482670006024
E        x: array([[ 0.004042+0.004042j, -0.005609-0.005609j, -0.004250-0.00425j , ...,
E                0.045709-0.070715j, -0.063121+0.042146j, -0.035555+0.018831j],
E              [-0.018591-0.018591j, -0.002732-0.002732j,  0.024933+0.024933j, ...,...
E        y: array([[-0.022052+0.004042j, -0.018349-0.005609j, -0.078264-0.00425j , ...,
E                0.074812-0.070715j, -0.017838+0.042146j, -0.059956+0.018831j],
E              [-0.216809-0.018591j,  0.224426-0.002732j, -0.154184+0.024933j, ...,...
pywt/tests/test_cwt_wavelets.py:387: AssertionError
_____________________________ test_cwt_method_fft ______________________________
    def test_cwt_method_fft():
        rstate = np.random.RandomState(1)
        data = rstate.randn(50)
        data[15] = 1.
        scales = np.arange(1, 64)
        wavelet = 'cmor1.5-1.0'

        # build a reference cwt with the legacy np.conv() method
        cfs_conv, _ = pywt.cwt(data, scales, wavelet, method='conv')

        # compare with the fft based convolution
        cfs_fft, _ = pywt.cwt(data, scales, wavelet, method='fft')
>       assert_allclose(cfs_conv, cfs_fft, rtol=0, atol=1e-13)
E       AssertionError: 
E       Not equal to tolerance rtol=0, atol=1e-13
E       
E       Mismatched elements: 150 / 3150 (4.76%)
E       Max absolute difference: 1.146537746216395
E       Max relative difference: 1.497151833596519
E        x: array([[-0.018290 -2.276161e-17j, -0.013562 -2.868661e-17j,
E                0.014260 -3.302193e-13j, ..., -0.020773 -7.407469e-02j,
E               -0.014319 +1.350186e-01j,  0.007514 -1.496994e-02j],...
E        y: array([[-0.018290-0.0411j  , -0.013562+0.109078j,  0.014260+0.081553j, ...,
E               -0.020773-0.101545j, -0.014319+0.060749j,  0.007514+0.049972j],
E              [ 0.035162-0.408651j, -0.016188+0.489424j,  0.021840-0.541804j, ...,...
pywt/tests/test_cwt_wavelets.py:449: AssertionError