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

apply_function docstring wrong for epochs? #13118

Open
sappelhoff opened this issue Feb 18, 2025 · 6 comments
Open

apply_function docstring wrong for epochs? #13118

sappelhoff opened this issue Feb 18, 2025 · 6 comments
Labels

Comments

@sappelhoff
Copy link
Member

see: https://mne.tools/dev/generated/mne.Epochs.html#mne.Epochs.apply_function

Image

☝ what is said here does not correspond to the actual data shape of epochs (3D arrays). So it is actually confusing how the passed function would deal with the epochs dimension.

See also:

%(fun_applyfun)s

mne-python/mne/utils/docs.py

Lines 1863 to 1871 in 64e01e5

docdict["fun_applyfun"] = applyfun_fun_base.format(
" if ``channel_wise=True`` and ``(len(picks), n_times)`` otherwise"
)
docdict["fun_applyfun_evoked"] = applyfun_fun_base.format(
" because it will apply channel-wise"
)
docdict["fun_applyfun_stc"] = applyfun_fun_base.format(
" because it will apply vertex-wise"
)

@sappelhoff sappelhoff added the DOC label Feb 18, 2025
@Imama-Kainat
Copy link

Hi, I'd like to take on this issue. I've identified the incorrect docstring in mne/utils/docs.py and will submit a pull request with the corrected string. I'll also ensure to run the tests and build the documentation to verify the fix

@shresth-keshari
Copy link
Contributor

Well, I made the changes to the docstrings, but can't figure out how to test the changes by maybe viewing it in a locally hosted html file.
Please let me know if you have any suggestions.

@drammock
Copy link
Member

I made the changes to the docstrings, but can't figure out how to test the changes by maybe viewing it in a locally hosted html file.

Instructions are in our contributor guide:

https://mne.tools/dev/development/contributing.html#building-the-documentation

Imama-Kainat added a commit to Imama-Kainat/mne-python that referenced this issue Mar 1, 2025
@Imama-Kainat
Copy link

@shresth-keshari I noticed that we both worked on this issue. I've completed the changes, built the documentation, and submitted a pull request. Let me know if any adjustments are needed. Looking forward to feedback!

@Imama-Kainat
Copy link

I made the changes to the docstrings, but can't figure out how to test the changes by maybe viewing it in a locally hosted html file.

Instructions are in our contributor guide:

https://mne.tools/dev/development/contributing.html#building-the-documentation

Thanks for it

@shresth-keshari
Copy link
Contributor

@shresth-keshari I noticed that we both worked on this issue. I've completed the changes, built the documentation, and submitted a pull request. Let me know if any adjustments are needed. Looking forward to feedback!

sure, let me know if I could help and thanks a lot !

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

No branches or pull requests

4 participants