You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
simulate_sparse_stc throws assertion error when n_dipoles > len(labels) #5953
changed the title [-]simulate_sparse_stc crashes when n_dipoles > len(labels)[/-][+]simulate_sparse_stc throws assertion error when n_dipoles > len(labels)[/+]on Feb 18, 2019
hum so now you get a warning but it will always crash afterwards? Basically warn should be ValueError or the min(n_dipoles, len(labels)) should actually be implemented?
yes, current warning is The number of labels is different from the number of dipoles. 2 dipole(s) will be generated, but then an assertion error is thrown
Activity
[-]simulate_sparse_stc crashes when n_dipoles > len(labels)[/-][+]simulate_sparse_stc throws assertion error when n_dipoles > len(labels)[/+]agramfort commentedon Feb 18, 2019
QB3 commentedon Feb 18, 2019
OK then we will have to change also the current warning msg:
mne-python/mne/simulation/source.py
Line 180 in 8b00fc9
agramfort commentedon Feb 18, 2019
hum so now you get a warning but it will always crash afterwards? Basically warn should be ValueError or the
min(n_dipoles, len(labels))should actually be implemented?QB3 commentedon Feb 18, 2019
yes, current warning is
The number of labels is different from the number of dipoles. 2 dipole(s) will be generated, but then an assertion error is thrownagramfort commentedon Feb 18, 2019
QB3 commentedon Feb 19, 2019
OK I will do this then:
n_dipoles > len(labels)--->>> ValueErrorn_dipoles < len(labels)---->>> keep the same generaten_dipolesdipolesagramfort commentedon Feb 19, 2019