Ignore:
Timestamp:
Jun 29, 2019, 1:35:40 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/crepe, fix/ffmpeg5, master
Children:
fc9c60e
Parents:
7abefed (diff), 2244f00 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' into feature/autosink

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_hztomel.py

    r7abefed r1ec59e4  
    55from numpy.testing import assert_equal, assert_almost_equal
    66from _tools import assert_warns
     7from utils import is32bit
    78import numpy as np
    89import aubio
     
    1011from aubio import hztomel, meltohz
    1112from aubio import hztomel_htk, meltohz_htk
    12 
    1313
    1414class aubio_hztomel_test_case(TestCase):
     
    1818        assert_almost_equal(hztomel(400. / 3.), 2., decimal=5)
    1919        assert_almost_equal(hztomel(1000. / 3), 5.)
    20         assert_equal(hztomel(200.), 3.)
     20        # on 32bit, some of these tests fails unless compiling with -ffloat-store
     21        try:
     22            assert_equal(hztomel(200.), 3.)
     23        except AssertionError:
     24            if not is32bit(): raise
     25            assert_almost_equal(hztomel(200.), 3., decimal=5)
    2126        assert_almost_equal(hztomel(1000.), 15)
    22         assert_almost_equal(hztomel(6400), 42)
    23         assert_almost_equal(hztomel(40960), 69)
     27        assert_almost_equal(hztomel(6400), 42, decimal=5)
     28        assert_almost_equal(hztomel(40960), 69, decimal=5)
    2429
    2530        for m in np.linspace(0, 1000, 100):
     
    2934        assert_equal(meltohz(0.), 0.)
    3035        assert_almost_equal(meltohz(2), 400. / 3., decimal=4)
    31         assert_equal(meltohz(3.), 200.)
     36        try:
     37            assert_equal(meltohz(3.), 200.)
     38        except AssertionError:
     39            if not is32bit(): raise
     40            assert_almost_equal(meltohz(3.), 200., decimal=5)
    3241        assert_almost_equal(meltohz(5), 1000. / 3., decimal=4)
    3342        assert_almost_equal(meltohz(15), 1000., decimal=4)
Note: See TracChangeset for help on using the changeset viewer.