Skip to content

Commit 1e068bf

Browse files
committed
warnings.warn not raise Warning
1 parent b4abc4d commit 1e068bf

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rsatoolbox/util/inference_util.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from __future__ import annotations
77
from collections.abc import Iterable
88
from typing import TYPE_CHECKING, Optional
9+
import warnings
910
import numpy as np
1011
from scipy import stats
1112
from scipy.stats import rankdata, wilcoxon
@@ -117,11 +118,11 @@ def pool_rdm(rdms, method: str = 'cosine'):
117118
rdm_vec = np.array([_nan_rank_data(v) for v in rdm_vec])
118119
rdm_vec = _nan_mean(rdm_vec)
119120
elif method in ('kendall', 'tau-b'):
120-
raise Warning('Noise ceiling for tau based on averaged ranks!')
121+
warnings.warn('Noise ceiling for tau based on averaged ranks!')
121122
rdm_vec = np.array([_nan_rank_data(v) for v in rdm_vec])
122123
rdm_vec = _nan_mean(rdm_vec)
123124
elif method == 'tau-a':
124-
raise Warning('Noise ceiling for tau based on averaged ranks!')
125+
warnings.warn('Noise ceiling for tau based on averaged ranks!')
125126
rdm_vec = np.array([_nan_rank_data(v) for v in rdm_vec])
126127
rdm_vec = _nan_mean(rdm_vec)
127128
else:

0 commit comments

Comments
 (0)