Changeset 208336b for python/tests/test_hist.py.old
- Timestamp:
- Mar 5, 2013, 8:55:29 AM (11 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
- Children:
- ad5203c
- Parents:
- f50e534
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_hist.py.old
rf50e534 r208336b 1 from template import aubio_unit_template 2 from localaubio import * 1 #! /usr/bin/env python 2 3 from numpy.testing import TestCase, assert_equal, assert_almost_equal 4 from aubio import fvec, digital_filter 3 5 import random 4 6 … … 10 12 nelems = 1000 11 13 12 class hist_ unit(aubio_unit_template):14 class hist_test_case(TestCase): 13 15 14 16 def setUp(self): … … 63 65 """ test hist on constant under lower limit """ 64 66 """ this returns 0 because constant is out of range """ 65 input = new_fvec(buf_size, channels)67 vec_in = fvec(buf_size) 66 68 constant = flow - 1. 67 fvec_write_sample(input,constant,0,0)69 vec_in[0] = constant 68 70 aubio_hist_do_notnull(self.o, input) 69 71 self.assertCloseEnough(0., aubio_hist_mean(self.o))
Note: See TracChangeset
for help on using the changeset viewer.