Skip to content

Commit

Permalink
Import GeneratorType
Browse files Browse the repository at this point in the history
  • Loading branch information
mbillingr committed May 5, 2016
1 parent 7baacab commit 910f7f7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions mne_sandbox/connectivity/mvar.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
from __future__ import division
import numpy as np
import logging
from types import GeneratorType

from scot.varbase import VARBase
from scot.var import VAR
Expand All @@ -17,13 +18,6 @@
from mne.utils import logger, verbose


# todo: I'm sure we can import generator from somewhere...
def _generator():
yield None
generator = type(_generator())
del _generator


def _autocorrelations(epochs, max_lag):
return [acm(epochs, l) for l in range(max_lag + 1)]

Expand Down Expand Up @@ -69,7 +63,7 @@ def _fit_mvar_yw(data, pmin, pmax, n_jobs, blocksize, verbose=None):
'automatic model order selection.')
order = pmin

if not isinstance(data, generator):
if not isinstance(data, GeneratorType):
blocksize = int(np.ceil(len(data) / n_jobs))

parallel, block_autocorrelations, _ = \
Expand Down

0 comments on commit 910f7f7

Please sign in to comment.