Mercurial > hg > plosone_underreview
comparison tests/test_map_and_average.py @ 30:e8084526f7e5 branch-tests
additional test functions
author | Maria Panteli <m.x.panteli@gmail.com> |
---|---|
date | Wed, 13 Sep 2017 19:57:49 +0100 |
parents | ed109218dd4b |
children | 4425a4918102 |
comparison
equal
deleted
inserted
replaced
29:6aa08c9c95e9 | 30:e8084526f7e5 |
---|---|
32 def test_averageframes(): | 32 def test_averageframes(): |
33 classlabels = np.array(['a', 'a', 'b', 'b', 'b']) | 33 classlabels = np.array(['a', 'a', 'b', 'b', 'b']) |
34 features = np.array([[0, 1], [0,2], [0, 1], [1, 1], [2, 1]]) | 34 features = np.array([[0, 1], [0,2], [0, 1], [1, 1], [2, 1]]) |
35 audiolabels = np.array(['a', 'a', 'b', 'b', 'b']) | 35 audiolabels = np.array(['a', 'a', 'b', 'b', 'b']) |
36 feat, audio, labels = map_and_average.averageframes(features, audiolabels, classlabels) | 36 feat, audio, labels = map_and_average.averageframes(features, audiolabels, classlabels) |
37 feat_true = np.array([[0, 0.5], [1, 1]]) | 37 feat_true = np.array([[0, 1.5], [1, 1]]) |
38 assert np.array_equal(feat, feat_true) |