MCPcopy Index your code
hub / github.com/mne-tools/mne-python / _check_X

Method _check_X

mne/decoding/ssd.py:232–241  ·  view source on GitHub ↗

Check input data.

(self, X, *, y=None, fit=False)

Source from the content-addressed store, hash-verified

230 _validate_type(self.cov_method_params, (abc.Mapping, None), "cov_method_params")
231
232 def _check_X(self, X, *, y=None, fit=False):
233 """Check input data."""
234 X = self._check_data(X, y=y, fit=fit, atleast_3d=False)
235 n_chan = X.shape[-2]
236 if isinstance(self.info, Info) and n_chan != self.info["nchan"]:
237 raise ValueError(
238 "Info must match the input data."
239 f"Found {n_chan} channels but expected {self.info['nchan']}."
240 )
241 return X
242
243 def fit(self, X, y=None):
244 """Estimate the SSD decomposition on raw or epoched data.

Callers 2

fitMethod · 0.95
transformMethod · 0.95

Calls 1

_check_dataMethod · 0.45

Tested by

no test coverage detected