question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ica.get_sources seems to be broken

See original GitHub issue

here is the script to reproduce:

import mne
from mne.preprocessing import ICA
from mne.datasets import sample

data_path = sample.data_path()
raw_fname = data_path + '/MEG/sample/sample_audvis_filt-0-40_raw.fif'

raw = mne.io.read_raw_fif(raw_fname)
raw.pick_types(meg=False, eeg=True, exclude='bads', stim=True).load_data()

ica = ICA(n_components=0.95, method='fastica').fit(raw)

ica_sources = ica.get_sources(raw, start=20, stop=40)
data, times = ica_sources[:]

ica_sources.plot()
assert data.shape == times.shape
assert abs(times[0] - 20) < 1

I get:

ValueError: shape mismatch: objects cannot be broadcast to a single shape

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
larsonercommented, Jan 28, 2021

This appears to be fixed by #8801

2reactions
cbrnrcommented, Jan 15, 2021

Good suggestion! tmin and tmax should always refer to seconds, and start/stop should always refer to samples.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ICA arguments confusion · Issue #4856 · mne-tools/mne-python
Here, it seems like MNE's ICA does not whiten by default, whereas EEGLAB and scikit-learn do whiten by default.
Read more >
Untitled
Masukin cash pb garena, Europeo basket 2015 sky, Wade bowen broken reflection. ... Diario de jerez accidente de coche, Ica sjolyst, Gamis modern...
Read more >
Lemur Documentation - Read the Docs
The keys are located within lemur/keys and broken down by ... CA (same public/private key pair as the ICA signed by ... GET...
Read more >
QALoad 5.02 Online Help - Micro Focus
In the following example's scenario, the ICA Seamless Window Agent window does not appear in the primary script, but appears intermittently ...
Read more >
Diff - 1b96d497c1..6e26093ba6 - chromium/src - Git at Google
-813,17 +813,18 @@ break; case 2: // child_ should create a scroll node. ... getResources(), R.color.input_underline_error_color)); return view;
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found