Ignore:
Timestamp:
Apr 18, 2016, 11:46:18 PM (4 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/constantq, feature/pitchshift, feature/pydocstrings, feature/timestretch, master, pitchshift, sampler, timestretch, yinfft+
Children:
81ad577, e76842e
Parents:
6db7600
Message:

tests/: continue python3 preparation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/tests/test_filterbank.py

    r6db7600 r376d5e9  
    1717  def test_set_coeffs(self):
    1818    f = filterbank(40, 512)
    19     r = random.random([40, 512 / 2 + 1]).astype('float32')
     19    r = random.random([40, int(512 / 2) + 1]).astype('float32')
    2020    f.set_coeffs(r)
    2121    assert_equal (r, f.get_coeffs())
     
    3636    f = filterbank(40, 512)
    3737    c = cvec(512)
    38     c.norm[:] = random.random((512 / 2 + 1,)).astype('float32')
     38    c.norm[:] = random.random((int(512 / 2) + 1,)).astype('float32')
    3939    assert_equal( f(c), 0)
    4040
     
    4242    f = filterbank(40, 512)
    4343    c = cvec(512)
    44     r = random.random([40, 512 / 2 + 1]).astype('float32')
     44    r = random.random([40, int(512 / 2) + 1]).astype('float32')
    4545    r /= r.sum()
    4646    f.set_coeffs(r)
    47     c.norm[:] = random.random((512 / 2 + 1,)).astype('float32')
     47    c.norm[:] = random.random((int(512 / 2) + 1,)).astype('float32')
    4848    assert_equal ( f(c) < 1., True )
    4949    assert_equal ( f(c) > 0., True )
     
    5353    c = cvec(512)
    5454    f.set_mel_coeffs_slaney(44100)
    55     c.norm[:] = random.random((512 / 2 + 1,)).astype('float32')
     55    c.norm[:] = random.random((int(512 / 2) + 1,)).astype('float32')
    5656    assert_equal ( f(c) < 1., True )
    5757    assert_equal ( f(c) > 0., True )
Note: See TracChangeset for help on using the changeset viewer.