Skip to content

Commit

Permalink
FIX: Green?
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Jan 7, 2025
1 parent 035726e commit b231dba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 5 additions & 1 deletion mne/decoding/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ def __sklearn_tags__(self):
"""Get sklearn tags."""
from sklearn.utils import get_tags # added in 1.6

return get_tags(self.model)
# fit method below does not allow sparse data via check_data, we could
# eventually make it smarter if we had to
tags = get_tags(self.model)
tags.input_tags.sparse = False
return tags

def __getattr__(self, attr):
"""Wrap to model for some attributes."""
Expand Down
8 changes: 4 additions & 4 deletions mne/decoding/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def inverse_transform(self, epochs_data):
return out


class Vectorizer(TransformerMixin):
class Vectorizer(TransformerMixin, BaseEstimator):
"""Transform n-dimensional array into 2D array of n_samples by n_features.
This class reshapes an n-dimensional array into an n_samples * n_features
Expand Down Expand Up @@ -343,7 +343,7 @@ def inverse_transform(self, X):


@fill_doc
class PSDEstimator(TransformerMixin):
class PSDEstimator(TransformerMixin, BaseEstimator):
"""Compute power spectral density (PSD) using a multi-taper method.
Parameters
Expand Down Expand Up @@ -452,7 +452,7 @@ def transform(self, epochs_data):


@fill_doc
class FilterEstimator(TransformerMixin):
class FilterEstimator(TransformerMixin, BaseEstimator):
"""Estimator to filter RtEpochs.
Applies a zero-phase low-pass, high-pass, band-pass, or band-stop
Expand Down Expand Up @@ -743,7 +743,7 @@ def _apply_method(self, X, method):


@fill_doc
class TemporalFilter(TransformerMixin):
class TemporalFilter(TransformerMixin, BaseEstimator):
"""Estimator to filter data array along the last dimension.
Applies a zero-phase low-pass, high-pass, band-pass, or band-stop
Expand Down
3 changes: 2 additions & 1 deletion tools/install_pre_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ python -m pip install $STD_ARGS pip setuptools packaging \
py-cpuinfo blosc2 hatchling
echo "NumPy/SciPy/pandas etc."
python -m pip uninstall -yq numpy
python -m pip install --upgrade matplotlib # TODO: Until https://github.com/matplotlib/matplotlib/pull/29427 lands
python -m pip install $STD_ARGS --only-binary ":all:" --default-timeout=60 \
--index-url "https://pypi.anaconda.org/scientific-python-nightly-wheels/simple" \
"numpy>=2.1.0.dev0" "scikit-learn>=1.6.dev0" "scipy>=1.15.0.dev0" \
"pandas>=3.0.0.dev0" "matplotlib>=3.10.0.dev0" \
"pandas>=3.0.0.dev0" \
"h5py>=3.12.1" "dipy>=1.10.0.dev0" "pyarrow>=19.0.0.dev0" "tables>=3.10.2.dev0"

# statsmodels requires formulaic@main so we need to use --extra-index-url
Expand Down

0 comments on commit b231dba

Please sign in to comment.