# Epochs.apply\_function(channel\_wise=False, picks=…) silently ignores picks

**URL:** <https://mne.discourse.group/t/epochs-apply-function-channel-wise-false-picks-silently-ignores-picks/11828>\
**Category:** Support & Discussions\
**Tags:** epochs\
**Created:** [May 8, 2026, 5:24am UTC](https://mne.discourse.group/t/epochs-apply-function-channel-wise-false-picks-silently-ignores-picks/11828 "2026-05-08T05:24:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![bkowshik](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/bkowshik/32/4755_2.png) [@bkowshik](https://mne.discourse.group/u/bkowshik)\
**Post date:** [May 8, 2026, 5:24am UTC](https://mne.discourse.group/t/epochs-apply-function-channel-wise-false-picks-silently-ignores-picks/11828/1 "2026-05-08T05:24:44Z")

</div>

While documenting the shape passed to `fun` for `Epochs.apply_function` (#13118), I noticed a behavioral asymmetry between `Raw` and `Epochs` that doesn’t appear to be documented anywhere.

When `channel_wise=False`:

- For Raw, `picks` is applied.
- For Epochs, `picks` is silently ignored.

## Example

```python
import numpy as np, mne
data = np.random.randn(3, 4, 50)
info = mne.create_info(["ch0","ch1","ch2","ch3"], sfreq=100., ch_types="eeg")
epochs = mne.EpochsArray(data, info, verbose=False)
raw = mne.io.RawArray(np.random.randn(4, 150), info, verbose=False)

shapes = []
def spy(x):
    shapes.append(x.shape); return x

epochs.copy().apply_function(spy, channel_wise=False, picks=["ch0"])
print("Epochs:", shapes) # [(3, 4, 50)] -> picks ignored
shapes.clear()                                                                                                     

raw.copy().apply_function(spy, channel_wise=False, picks=["ch0"])
print("Raw: ", shapes) # [(1, 150)] -> picks applied

```

---

<div class="post-metadata">

**Author:** ![tsbinns](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/tsbinns/32/4543_2.png) [@tsbinns](https://mne.discourse.group/u/tsbinns)\
**Post date:** [May 10, 2026, 4:49pm UTC](https://mne.discourse.group/t/epochs-apply-function-channel-wise-false-picks-silently-ignores-picks/11828/2 "2026-05-10T16:49:27Z")

</div>

Hi @bkowshik, welcome to the forums, and thanks for reporting this!  
I’ve opened a PR to fix this: [Fix `picks` being ignored in `Epochs.apply_function()` by tsbinns · Pull Request #13894 · mne-tools/mne-python · GitHub](https://github.com/mne-tools/mne-python/pull/13894)

---

<div class="post-metadata">

**Author:** ![tsbinns](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/tsbinns/32/4543_2.png) [@tsbinns](https://mne.discourse.group/u/tsbinns)\
**Post date:** [May 12, 2026, 8:36am UTC](https://mne.discourse.group/t/epochs-apply-function-channel-wise-false-picks-silently-ignores-picks/11828/3 "2026-05-12T08:36:47Z")

</div>

The PR has been merged, so the fix will be available in the next release.
