Skip to content

Commit

Permalink
first type fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
thht committed Jul 26, 2024
1 parent d3d4c94 commit 3b59edd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pyrasa/utils/aperiodic_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Utilities for slope fitting."""

import warnings
from collections.abc import Callable, Iterable
from collections.abc import Iterable

import numpy as np
import pandas as pd
Expand Down Expand Up @@ -30,7 +30,7 @@ def knee_model(x, b0, k, b1, b2):
return y_hat


def _get_gof(psd: np.ndarray, psd_pred: np.ndarray, fit_func: Callable) -> tuple[pd.DataFrame, pd.DataFrame]:
def _get_gof(psd: np.ndarray, psd_pred: np.ndarray, fit_func: str) -> pd.DataFrame:
"""
get goodness of fit (i.e. mean squared error and R2)
BIC and AIC currently assume OLS
Expand Down
4 changes: 2 additions & 2 deletions pyrasa/utils/peak_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def get_peak_params(
periodic_spectrum: np.ndarray,
freqs: np.ndarray,
ch_names: Iterable = (),
ch_names: Iterable | None = None,
smooth: bool = True,
smoothing_window: int = 1,
polyorder: int = 1,
Expand Down Expand Up @@ -57,7 +57,7 @@ def get_peak_params(
freq_step = freqs[1] - freqs[0]

# generate channel names if not given
if len(ch_names) == 0:
if ch_names is None:
ch_names = np.arange(periodic_spectrum.shape[0])

# cut data
Expand Down

0 comments on commit 3b59edd

Please sign in to comment.