diff --git a/noptica.py b/noptica.py index a3fe8fb..5587a00 100644 --- a/noptica.py +++ b/noptica.py @@ -195,7 +195,7 @@ class LinearPhaseFilter: def __init__(self, numtaps, *args, **kwargs): self.numtaps = numtaps self.coef = signal.firwin(numtaps, *args, **kwargs) - self.state = np.zeros(self.numtaps - 1) + self.state = np.zeros(self.numtaps - 1, dtype="complex64") def input(self, block): output, self.state = signal.lfilter(self.coef, [1.0], block, zi=self.state) @@ -210,8 +210,8 @@ class Delay: def __init__(self, block_size, delay_amount): self.block_size = block_size self.delay_amount = delay_amount - self.output = np.zeros(block_size) - self.next = np.zeros(delay_amount) + self.output = np.zeros(block_size, dtype="complex64") + self.next = np.zeros(delay_amount, dtype="complex64") def input(self, block): assert(len(block) == self.block_size)