Skip to content

Commit

Permalink
Fix ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrnr committed Feb 24, 2025
1 parent 269e0d3 commit d8b963f
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
1 change: 1 addition & 0 deletions mne/cov.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
)
from .rank import _compute_rank
from .utils import (
_array_repr,
_check_fname,
_check_on_missing,
_check_option,
Expand Down
1 change: 1 addition & 0 deletions mne/dipole.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
copy_function_doc_to_method_doc,
fill_doc,
logger,
pinvh,
verbose,
warn,
)
Expand Down
7 changes: 4 additions & 3 deletions mne/fixes.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Compatibility fixes for older versions of libraries
"""Compatibility fixes for older versions of libraries.
If you add content to this file, please give the version of the package
at which the fix is no longer needed.
Expand Down Expand Up @@ -70,7 +70,7 @@ def _median_complex(data, axis):


def _safe_svd(A, **kwargs):
"""Wrapper to get around the SVD did not converge error of death"""
"""Workaround the SVD did not converge error of death."""
# Intel has a bug with their GESVD driver:
# https://software.intel.com/en-us/forums/intel-distribution-for-python/topic/628049 # noqa: E501
# For SciPy 0.18 and up, we can work around it by using
Expand Down Expand Up @@ -112,7 +112,7 @@ def rng_uniform(rng):


def _validate_sos(sos):
"""Helper to validate a SOS input."""
"""Help validate an SOS input."""
sos = np.atleast_2d(sos)
if sos.ndim != 2:
raise ValueError("sos array must be 2D")
Expand Down Expand Up @@ -527,6 +527,7 @@ def _assess_dimension_(spectrum, rank, n_samples, n_features):


def svd_flip(u, v, u_based_decision=True):
"""Sign correction to ensure deterministic output from SVD."""
if u_based_decision:
# columns of u, rows of v
max_abs_cols = np.argmax(np.abs(u), axis=0)
Expand Down
2 changes: 1 addition & 1 deletion mne/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
from ..viz._brain.view import views_dicts
from ..viz._scraper import _mne_qt_browser_screenshot
from ..viz.misc import _get_bem_plotting_surfaces, _plot_mri_contours
from ..viz.utils import _ndarray_to_fig
from ..viz.utils import _get_plot_ch_type, _ndarray_to_fig

_BEM_VIEWS = ("axial", "sagittal", "coronal")

Expand Down
2 changes: 2 additions & 0 deletions mne/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@
_arange_div,
_hashable_ndarray,
_custom_lru_cache,
_array_repr,
)
from .mixin import (
SizeMixin,
Expand All @@ -201,6 +202,7 @@
eigh,
_get_blas_funcs,
pinv,
pinvh,
)
from .dataframe import (
_set_pandas_dtype,
Expand Down
1 change: 1 addition & 0 deletions mne/viz/topo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import numpy as np

from .._fiff.pick import _picks_to_idx, channel_type, pick_types
from ..channels import find_layout
from ..defaults import _handle_default
from ..utils import Bunch, _check_option, _clean_names, _is_numeric, _to_rgb, fill_doc
from .ui_events import ChannelsSelect, publish, subscribe
Expand Down

0 comments on commit d8b963f

Please sign in to comment.