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

Move from pick_types to inst.pick #151

Closed
sappelhoff opened this issue Aug 14, 2024 · 5 comments · Fixed by #161
Closed

Move from pick_types to inst.pick #151

sappelhoff opened this issue Aug 14, 2024 · 5 comments · Fixed by #161
Labels
maintenance basic code health tasks
Milestone

Comments

@sappelhoff
Copy link
Owner

See for example:

self.raw_mne.pick_types(eeg=True)

This raises:

NOTE: pick_types() is a legacy function. New code should use inst.pick(...).

@sappelhoff sappelhoff added this to the 0.5.0 milestone Aug 14, 2024
@sappelhoff sappelhoff added the maintenance basic code health tasks label Aug 14, 2024
@Ayush-Devs
Copy link
Contributor

Hello, This is my first PR, but I am confident I will be able to update the code. Can you assign this to me? and I will start working on it immediately.

@sappelhoff
Copy link
Owner Author

Hey @Ayush-Devs, sure -- please feel free to open a PR.

@Ayush-Devs
Copy link
Contributor

Ayush-Devs commented Aug 25, 2024

The raw.pick() method returns the modified Raw object itself, not a numpy.ndarray like pick_types() used to.

if len(arys) == 1:
result = asanyarray(arys[0])

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (60,) + inhomogeneous part.

not really sure how to work around this issue.

@sappelhoff
Copy link
Owner Author

Hey @Ayush-Devs, I am making quite a few changes in the background regarding the pyprep infrastructure right now, so it'd be good to not work on this for a while. I had assumed you closing your PR meant that.

@sappelhoff
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance basic code health tasks
Projects
None yet
2 participants