mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

apply_function docstring wrong for epochs?

Open sappelhoff opened this issue 10 months ago • 6 comments

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:

https://github.com/mne-tools/mne-python/blob/64e01e54a3e149460c86a082ecb913993cd93dc6/mne/epochs.py#L1942

https://github.com/mne-tools/mne-python/blob/64e01e54a3e149460c86a082ecb913993cd93dc6/mne/utils/docs.py#L1863-L1871

sappelhoff avatar Feb 18 '25 15:02 sappelhoff

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

Imama-Kainat avatar Feb 28 '25 11:02 Imama-Kainat

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.

shresth-keshari avatar Feb 28 '25 15:02 shresth-keshari

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

drammock avatar Feb 28 '25 15:02 drammock

@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 avatar Mar 01 '25 10:03 Imama-Kainat

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

Imama-Kainat avatar Mar 01 '25 10:03 Imama-Kainat

@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 !

shresth-keshari avatar Mar 01 '25 14:03 shresth-keshari