We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to create an identity covariance matrix. Using the code (make_ad_hoc_cov) below seems to work, however plotting leads to:
IndexError: too many indices for array: array is 1-dimensional, but 2 were indexed
Going the non-recommended way of instantiating mne.Covariance directly works, however.
mne.Covariance
Am I on the wrong track to create an identity matrix this way, or is this a potential issue with the code in mne?
import mne import numpy as np n = 50 sfreq = 100 info = mne.create_info([f"ch{i}" for i in range(n)], sfreq, ch_types='eeg', verbose=None) # recommended way? cov = mne.cov.make_ad_hoc_cov(info, std={"eeg": 1}) cov.plot(info) # error # not recommended cov2 = mne.Covariance(data=np.eye(n), names=info.ch_names, bads=info["bads"], projs=[], nfree=1) cov2.plot(info) # works
The text was updated successfully, but these errors were encountered:
We should fix plot_cov to deal with diagonal noise covariances (which includes those returned by make_ad_hoc_cov)
plot_cov
make_ad_hoc_cov
Sorry, something went wrong.
No branches or pull requests
I want to create an identity covariance matrix. Using the code (make_ad_hoc_cov) below seems to work, however plotting leads to:
Going the non-recommended way of instantiating
mne.Covariance
directly works, however.Am I on the wrong track to create an identity matrix this way, or is this a potential issue with the code in mne?
The text was updated successfully, but these errors were encountered: