Skip to content
New issue

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

FOOOFGroup method : ValueError: setting an array element with a sequence. #333

Closed
Clemencegdx opened this issue Sep 3, 2024 · 2 comments

Comments

@Clemencegdx
Copy link

Hi,
I’m trying to apply a FOOOFGroup method on a matrix of 20 PSD with 201 point of frequencies.
My datas are a PSD array (20,201) and frequencies array (201,).

When i’m runing the ‘fg.group_results’ i’v this kind of message - that i also have when i run in details the ‘get_params’ function ‘peak_params’. That’s not occurs with the ‘aperiodic_params’ and ‘exponent’.

FOOOF fg.get_params(‘peak_params’)
File ~/Applications/MNE-Python/1.5.1_0/.mne-python/lib/python3.11/site-packages/fooof/objs/group.py:379 in get_params
out = np.array([np.insert(getattr(data, name), 3, index, axis=1)
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (20,) + inhomogeneous part.

Do you have idea of what i'm doing wrong to get this kind of error?

Thanks you very much

Clémence

@TomDonoghue
Copy link
Member

Hey @Clemencegdx - I think this is the same issue as in #313. Long story short, if you check your fooof version and update to 1.1, this should be updated and fixed (perhaps also check and update your version of numpy).

@Clemencegdx
Copy link
Author

Hi Tom, Oh yes!! the problem was the numpy version... i was in 1.24...

Thanks you very much :)

Clémence

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants