added multiply
This commit is contained in:
parent
9f9d3d7e06
commit
f281b981ea
@ -1,5 +1,6 @@
|
||||
import numpy as np
|
||||
from scipy.interpolate import interp1d
|
||||
from torch import mul
|
||||
|
||||
class Normalize:
|
||||
"""
|
||||
@ -41,6 +42,15 @@ class NormalizeAmplitude:
|
||||
return f"NormalizeAmplitude(high={self.high})"
|
||||
|
||||
|
||||
class Multiply:
|
||||
def __init__(self, multiplier):
|
||||
self.multiplier = multiplier
|
||||
def __call__(self, data):
|
||||
return data * self.multiplier
|
||||
def __repr__(self):
|
||||
return f"Multiply(multiplier={self.multiplier})"
|
||||
|
||||
|
||||
class ConstantInterval:
|
||||
"""
|
||||
Interpolate the data to have a constant interval / sample rate,
|
||||
|
Loading…
Reference in New Issue
Block a user