Skip to content

Commit a6fd5cd

Browse files
bkowshiklarsoner
andauthored
DOC: Fix apply_function shape description for Epochs (#13891)
Co-authored-by: Eric Larson <larson.eric.d@gmail.com>
1 parent 6a0ffdf commit a6fd5cd

4 files changed

Lines changed: 8 additions & 1 deletion

File tree

doc/changes/dev/13891.other.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed the ``fun`` shape description in :meth:`mne.Epochs.apply_function`'s docstring, by :newcontrib:`Bhargav Kowshik`.

doc/changes/names.inc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
.. _Beige Jin: https://github.com/BeiGeJin
4141
.. _Ben Beasley: https://github.com/musicinmybrain
4242
.. _Benedikt Ehinger: https://www.benediktehinger.de
43+
.. _Bhargav Kowshik: https://github.com/bkowshik
4344
.. _Bradley Voytek: https://github.com/voytek
4445
.. _Britta Westner: https://britta-wstnr.github.io
4546
.. _Bruno Aristimunha: https://bruaristimunha.github.io

mne/epochs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1974,7 +1974,7 @@ def apply_function(
19741974
19751975
Parameters
19761976
----------
1977-
%(fun_applyfun)s
1977+
%(fun_applyfun_epochs)s
19781978
%(picks_all_data_noref)s
19791979
%(dtype_applyfun)s
19801980
%(n_jobs)s Ignored if ``channel_wise=False`` as the workload

mne/utils/docs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,6 +1919,11 @@ def _reflow_param_docstring(docstring, has_first_line=True, width=75):
19191919
docdict["fun_applyfun"] = applyfun_fun_base.format(
19201920
" if ``channel_wise=True`` and ``(len(picks), n_times)`` otherwise"
19211921
)
1922+
docdict["fun_applyfun_epochs"] = applyfun_fun_base.format(
1923+
" if ``channel_wise=True`` (because it will apply to 1-D"
1924+
" slices along the times axis) and"
1925+
" ``(n_epochs, len(picks), n_times)`` otherwise"
1926+
)
19221927
docdict["fun_applyfun_evoked"] = applyfun_fun_base.format(
19231928
" because it will apply channel-wise"
19241929
)

0 commit comments

Comments
 (0)