Changeset d98f3c0


Ignore:
Timestamp:
Nov 28, 2016, 6:14:01 PM (8 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler, yinfft+
Children:
a1bf01d
Parents:
4093c0c
Message:

python/tests/test_fft.py: skip test fft(zeros).phas == 0 if needed, expected powerpc

Location:
python/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_fft.py

    r4093c0c rd98f3c0  
    3434        fftgrain = f (timegrain)
    3535        assert_equal ( fftgrain.norm, 0 )
    36         assert_equal ( fftgrain.phas, 0 )
     36        try:
     37            assert_equal ( fftgrain.phas, 0 )
     38        except AssertionError:
     39            assert_equal (fftgrain.phas[fftgrain.phas > 0], +pi)
     40            assert_equal (fftgrain.phas[fftgrain.phas < 0], -pi)
     41            assert_equal (np.abs(fftgrain.phas[np.abs(fftgrain.phas) != pi]), 0)
     42            self.skipTest('fft(fvec(%d)).phas != +0, ' % win_s \
     43                    + 'This is expected when using fftw3 on powerpc.')
    3744
    3845    def test_impulse(self):
  • python/tests/test_phasevoc.py

    r4093c0c rd98f3c0  
    4747            assert_equal ( t, 0.)
    4848            assert_equal ( s.norm, 0.)
    49             assert_equal ( s.phas, 0.)
     49            try:
     50                assert_equal ( s.phas, 0 )
     51            except AssertionError:
     52                assert_equal (s.phas[s.phas > 0], +np.pi)
     53                assert_equal (s.phas[s.phas < 0], -np.pi)
     54                assert_equal (np.abs(s.phas[np.abs(s.phas) != np.pi]), 0)
     55                self.skipTest('pvoc(fvec(%d)).phas != +0, ' % win_s \
     56                        + 'This is expected when using fftw3 on powerpc.')
    5057            assert_equal ( r, 0.)
    5158
Note: See TracChangeset for help on using the changeset viewer.