Mercurial > hg > chime-home-dataset-annotation-and-baseline-evaluation-code
view gmm_baseline_experiments/external_libs/librosa/librosa-0.3.1/tests/testLibrosaDecompose.py @ 2:cb535b80218a
Remaining scripts and brief documentation
author | peterf |
---|---|
date | Fri, 10 Jul 2015 23:24:23 +0100 |
parents | |
children |
line wrap: on
line source
#!/usr/bin/env python # CREATED: 2013-10-06 22:31:29 by Dawen Liang <dl2771@columbia.edu> # unit tests for librosa.decompose import numpy as np import librosa def test_default_decompose(): X = np.array([[1, 2, 3, 4, 5, 6], [1, 1, 1.2, 1, 0.8, 1]]) (W, H) = librosa.decompose.decompose(X) assert np.allclose(X, W.dot(H), rtol=1e-2, atol=1e-2) pass