File: up_check_numpy

package info (click to toggle)
python-mne 0.17%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 95,104 kB
  • sloc: python: 110,639; makefile: 222; sh: 15
file content (26 lines) | stat: -rw-r--r-- 1,176 bytes parent folder | 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
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?

--- a/mne/decoding/tests/test_receptive_field.py
+++ b/mne/decoding/tests/test_receptive_field.py
@@ -10,7 +10,7 @@ from numpy.testing import assert_array_e
 
 from mne import io, pick_types
 from mne.fixes import einsum
-from mne.utils import requires_version, run_tests_if_main
+from mne.utils import requires_version, run_tests_if_main, check_version
 from mne.decoding import ReceptiveField, TimeDelayingRidge
 from mne.decoding.receptive_field import (_delay_time_series, _SCORERS,
                                           _times_to_delays, _delays_to_slice)
@@ -495,6 +495,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)