Skip to content

Commit a8084cb

Browse files
FIX: Raise exception on rank estimate with too few samples
Signed-off-by: Emmanuel Ferdman <[email protected]>
1 parent 1a569d0 commit a8084cb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mne/rank.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ def _estimate_rank_meeg_signals(
184184
"""
185185
picks_list = _picks_by_type(info)
186186
if data.shape[1] < data.shape[0]:
187-
ValueError(
187+
raise ValueError(
188188
"You've got fewer samples than channels, your "
189189
"rank estimate might be inaccurate."
190190
)
@@ -249,7 +249,7 @@ def _estimate_rank_meeg_cov(
249249
scalings = _handle_default("scalings_cov_rank", scalings)
250250
_apply_scaling_cov(data, picks_list, scalings)
251251
if data.shape[1] < data.shape[0]:
252-
ValueError(
252+
raise ValueError(
253253
"You've got fewer samples than channels, your "
254254
"rank estimate might be inaccurate."
255255
)

0 commit comments

Comments
 (0)