Package: python-mne / 1.3.0+dfsg-1

up_check_numpy Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Author: Yaroslav Halchenko
Last-Update: 2017-12-04 22:58:05 -0500
Description: Check for numpy version
FIXME: Is this patch needed any more in version 0.17?
Last-Update: 2019-09-01

--- a/mne/decoding/tests/test_receptive_field.py
+++ b/mne/decoding/tests/test_receptive_field.py
@@ -10,7 +10,7 @@ from numpy import einsum
 from numpy.fft import rfft, irfft
 from numpy.testing import assert_array_equal, assert_allclose, assert_equal
 
-from mne.utils import requires_sklearn
+from mne.utils import requires_sklearn, check_version
 from mne.decoding import ReceptiveField, TimeDelayingRidge
 from mne.decoding.receptive_field import (_delay_time_series, _SCORERS,
                                           _times_to_delays, _delays_to_slice)
@@ -517,6 +517,9 @@ def test_inverse_coef():
         rf = ReceptiveField(tmin, tmax, 1., estimator=estimator,
                             patterns=True)
         rf.fit(X, y)
+        # For some reason there is no warning
+        if estimator and not check_version('numpy', '1.13'):
+            continue
         inv_rf = ReceptiveField(tmin, tmax, 1., estimator=estimator,
                                 patterns=True)
         inv_rf.fit(y, X)