Skip to content

Commit

Permalink
FIX: Make test more lenient
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Feb 3, 2016
1 parent 436733b commit 87090d0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions mne/decoding/tests/test_csp.py
Expand Up @@ -73,8 +73,10 @@ def test_csp():
# test covariance estimation methods (results should be roughly equal)
csp_epochs = CSP(cov_est="epoch")
csp_epochs.fit(epochs_data, y)
assert_array_almost_equal(csp.filters_, csp_epochs.filters_, -1)
assert_array_almost_equal(csp.patterns_, csp_epochs.patterns_, -1)
for attr in ('filters_', 'patterns_'):
assert_true(np.corrcoef(
getattr(csp, attr).ravel(),
getattr(csp_epochs, attr).ravel())[0, 1] > 0.95)

# make sure error is raised for undefined estimation method
csp_fail = CSP(cov_est="undefined")
Expand Down

0 comments on commit 87090d0

Please sign in to comment.