Skip to content

Commit

Permalink
rename import
Browse files Browse the repository at this point in the history
  • Loading branch information
ravioli1369 committed Jan 23, 2025
1 parent fc92def commit 8e4c1e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ml4gw/highpass.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import numpy as np
import torch
import torchaudio
from torchaudio.functional import filtfilt as torchaudio_filtfilt
from torchaudio.functional import filtfilt

from .constants import PI

Expand Down Expand Up @@ -298,5 +298,5 @@ def iirfilter(N, Wn, btype="low", analog=False, fs=None):

def butter_filter_torch(data, cutoff, fs, order, btype):
b, a = iirfilter(order, cutoff, btype=btype, analog=False, fs=fs)
filtered_data = torchaudio_filtfilt(data, a, b, clamp=False)
filtered_data = filtfilt(data, a, b, clamp=False)
return filtered_data, b, a

0 comments on commit 8e4c1e4

Please sign in to comment.