Skip to content

Commit d142bd0

Browse files
committed
fix validation of covariances
1 parent a9d5390 commit d142bd0

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

mne/decoding/base.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,11 @@ def fit(self, X, y=None):
118118
atleast_3d=False if self.restr_type == "ssd" else True,
119119
)
120120
covs, C_ref, info, rank, kwargs = self.cov_callable(X, y, **self.cov_params)
121-
self._validate_covariances(covs + [C_ref])
121+
covs = np.stack(covs)
122+
self._validate_covariances(covs)
123+
self._validate_covariances([C_ref])
122124
if self.dec_type == "single":
123125
if len(covs) > 2:
124-
covs = np.array(covs)
125126
sample_weights = kwargs["sample_weights"]
126127
restr_map = _handle_restr_map(C_ref, self.restr_type, info, rank)
127128
evecs = _smart_ajd(covs, restr_map, weights=sample_weights)

mne/decoding/covs_ged.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,6 @@ def _xdawn_estimate(
246246
covs.append(evo_cov)
247247

248248
covs.append(R)
249-
covs = np.stack(covs)
250249
C_ref = None
251250
rank = None
252251
info = None

0 commit comments

Comments
 (0)