[med-svn] [python-mne] 216/353: use built-in set

Yaroslav Halchenko debian at onerussian.com
Fri Nov 27 17:25:00 UTC 2015


This is an automated email from the git hooks/post-receive script.

yoh pushed a commit to tag 0.4
in repository python-mne.

commit aa194a24be5ed49357171d670fb6d74484191770
Author: mluessi at nmr.mgh.harvard.edu <mluessi at nmr.mgh.harvard.edu>
Date:   Wed Jun 20 10:55:06 2012 -0400

    use built-in set
---
 mne/selection.py            | 3 +--
 mne/tests/test_selection.py | 5 ++---
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/mne/selection.py b/mne/selection.py
index ef7bd8a..ba52262 100644
--- a/mne/selection.py
+++ b/mne/selection.py
@@ -5,7 +5,6 @@
 # License: BSD (3-clause)
 
 from os import path
-from sets import Set
 
 
 def read_selection(name, fname=None):
@@ -92,7 +91,7 @@ def read_selection(name, fname=None):
             raise ValueError('No match for selection name "%s" found' % n)
 
     # make the selection a sorted list with unique elements
-    sel = list(Set(sel))
+    sel = list(set(sel))
     sel.sort()
 
     return sel
diff --git a/mne/tests/test_selection.py b/mne/tests/test_selection.py
index 99deec2..7b5c465 100644
--- a/mne/tests/test_selection.py
+++ b/mne/tests/test_selection.py
@@ -1,4 +1,3 @@
-from sets import Set
 from .. import read_selection
 
 
@@ -21,9 +20,9 @@ def test_read_selection():
     right = read_selection('R')
 
     assert(len(all_ch) == len(left) + len(right))
-    assert(len(Set(left).intersection(Set(right))) == 0)
+    assert(len(set(left).intersection(set(right))) == 0)
 
     frontal = read_selection('frontal')
     occipital = read_selection('Right-occipital')
-    assert(len(Set(frontal).intersection(Set(occipital))) == 0)
+    assert(len(set(frontal).intersection(set(occipital))) == 0)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-mne.git



More information about the debian-med-commit mailing list