Last active
November 24, 2020 02:06
-
-
Save talhaanwarch/9d750a4f2a82f5ed72a88ba7cfa38533 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from joblib import Parallel, delayed | |
import numpy as np | |
import time | |
from mne_features.feature_extraction import FeatureExtractor | |
feature=['mean','variance','std'] | |
fe = FeatureExtractor(sfreq=1024, selected_funcs=feature) | |
def f(x): | |
l =np.random.randint(0, 100, size=(100, 64, 3000)) | |
return np.std(l[:,x,:],-1) | |
st=time.time() | |
results = Parallel(n_jobs=-1)(delayed(f)(i) for i in range(64)) | |
print(time.time()-st) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment