# question about permutation\_cluster\_test

**URL:** <https://mne.discourse.group/t/question-about-permutation-cluster-test/2158>\
**Category:** Mailing List Archive (read-only)\
**Tags:** list-archive\
**Created:** [April 15, 2020, 2:28pm UTC](https://mne.discourse.group/t/question-about-permutation-cluster-test/2158 "2020-04-15T14:28:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 15, 2020, 2:28pm UTC](https://mne.discourse.group/t/question-about-permutation-cluster-test/2158/1 "2020-04-15T14:28:25Z")

</div>

External Email - Use Caution

Hello,

I juste have a quick question regarding mne.stats.permutation\_cluster\_test.

When I give it two arrays X1 and X2 of shape (n subjects x n channels x n freq), I have the following error: ValueError: connectivity (len 20484) must be of the correct size, i.e. be equal to or evenly divide the number of tests (2580984).

The error disappear if I reshape X1 and X2 into shape (n subjects x n freq x nchannels).

I was wondering why because I did not see anything about that in the documentation of permutation\_cluster\_test.

Thanks in advance!

Kind regards,

Fleur  
-------------- next part --------------  
An HTML attachment was scrubbed...  
URL: [http://mail.nmr.mgh.harvard.edu/pipermail/mne\_analysis/attachments/20200415/336b6440/attachment.html](http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20200415/336b6440/attachment.html)

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 16, 2020, 4:36pm UTC](https://mne.discourse.group/t/question-about-permutation-cluster-test/2158/2 "2020-04-16T16:36:42Z")

</div>

External Email - Use Caution

Hi Fleur,  
The \*\*last dimension\*\* of the arrays in X should be the dimension represented by `connectivity`. So this is why it must be (n\_subjs x n\_freq x n\_channels), instead of (n\_subjs x n\_channels x n\_freq). I agree that this is not explained well in [the docstring]([https://mne.tools/dev/generated/mne.stats.permutation\_cluster\_test.html](https://mne.tools/dev/generated/mne.stats.permutation_cluster_test.html)). Would you like to make a pull request suggesting a docstring improvement?

-- dan  
Daniel McCloy  
[https://dan.mccloy.info](https://dan.mccloy.info)  
Research Scientist  
Institute for Learning and Brain Sciences  
University of Washington

??? Original Message ???

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/mne/original/1X/85cc6bd2b69cb698a166dc6d880fb550510d0144.jpeg) [@system](https://mne.discourse.group/u/system)\
**Post date:** [April 20, 2020, 4:10pm UTC](https://mne.discourse.group/t/question-about-permutation-cluster-test/2158/3 "2020-04-20T16:10:34Z")

</div>

External Email - Use Caution

Hello,

Thank you for your answer.  
I'm sorry, I'm not sure how to make a PR (I'm a M2 student).

Fleur
