libs/data/utils.py
def resample_signal(signal, fs_old, fs_new):
    """Returns resampled signal, from fs_old Hz to fs_new Hz."""
    gcd_freqs = math.gcd(fs_new, fs_old)
    up = int(fs_new / gcd_freqs)
    down = int(fs_old / gcd_freqs)
    signal = resample_poly(signal, up, down)
    signal = np.array(signal, dtype=np.float32)
    return signal
Returns resampled signal, from fs_old Hz to fs_new Hz.
Returns resampled signal, from fs_old Hz to fs_new Hz.
Returns resampled signal from fs_old Hz to fs_new Hz .
def resample_signal(signal, fs_old, fs_new):
    gcd_freqs = math.gcd(fs_new, fs_old)
    up = int(fs_new / gcd_freqs)
    down = int(fs_old / gcd_freqs)
    signal = resample_poly(signal, up, down)
    signal = np.array(signal, dtype=np.float32)
    return signal
def resample_signal ( signal , fs_old , fs_new ) : gcd_freqs = math . gcd ( fs_new , fs_old ) up = int ( fs_new / gcd_freqs ) down = int ( fs_old / gcd_freqs ) signal = resample_poly ( signal , up , down ) signal = np . array ( signal , dtype = np . float32 ) return signal
Returns resampled signal, from fs_old Hz to fs_new Hz.
Returns resampled signal from fs_old Hz to fs_new Hz .
"""Returns resampled signal, from fs_old Hz to fs_new Hz."""
signal
fs_old
fs_new