When computing pairwise ISCs, the output is a condensed triangle vector (via squareform) with length N * (N - 1) / 2, where N is the number of subjects. In the context of two separate (non-paired) groups, ISCs are computed separately and the resulting condensed vectors are v-stacked (note that there may not be the same number of subjects in each group). When passing this stacked pairwise ISC array for two groups to permutation_isc, the _check_isc_input doesn't handle the stacked groups properly. It assumes there's one group and breaks because that stacked array likely won't have the correct number of elements for squareform. I think most of the rest of the permutation test handles this situation properly, but the logic of _check_isc_input needs to be adjusted, and we need a test confirms this is handled properly. Thanks to @mcdoar9 for catching this!
When computing pairwise ISCs, the output is a condensed triangle vector (via
squareform) with lengthN * (N - 1) / 2, whereNis the number of subjects. In the context of two separate (non-paired) groups, ISCs are computed separately and the resulting condensed vectors are v-stacked (note that there may not be the same number of subjects in each group). When passing this stacked pairwise ISC array for two groups topermutation_isc, the_check_isc_inputdoesn't handle the stacked groups properly. It assumes there's one group and breaks because that stacked array likely won't have the correct number of elements forsquareform. I think most of the rest of the permutation test handles this situation properly, but the logic of_check_isc_inputneeds to be adjusted, and we need a test confirms this is handled properly. Thanks to @mcdoar9 for catching this!