Skip to content

Commit

Permalink
Update entropy_spectral.py
Browse files Browse the repository at this point in the history
  • Loading branch information
DominiqueMakowski committed Sep 11, 2023
1 parent 4b878ae commit 2a2c058
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion neurokit2/complexity/entropy_spectral.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ def entropy_spectral(signal, bins=None, show=False, **kwargs):

# Cut into bins
if isinstance(bins, int):
psd = psd.groupby(pd.cut(psd["Frequency"], bins=bins)).agg("sum")
psd = psd.groupby(pd.cut(psd["Frequency"], bins=bins), observed=False).agg(
"sum"
)
idx = psd.index.values.astype(str)
else:
idx = psd["Frequency"].values
Expand Down

0 comments on commit 2a2c058

Please sign in to comment.