Skip to content

Commit fd7e080

Browse files
mariomario
authored andcommitted
add reshape to convolution in online_processor
1 parent 01b901d commit fd7e080

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

code/python/cni_toolbox/gadgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def convolve(self, x):
199199
convolved sample
200200
'''
201201

202-
x_fft = fft(np.vstack((x, np.zeros((self.l_subsampled, self.n_channels)))), axis=0)
202+
x_fft = fft(np.vstack((x.reshape(1,-1), np.zeros((self.l_subsampled, self.n_channels)))), axis=0)
203203
self.conv_x = np.append(self.conv_x, np.zeros(self.n_channels))
204204
self.conv_x[self.step:self.step + self.l_subsampled, :] += np.abs(ifft(
205205
x_fft * np.expand_dims(self.kernel_fft , axis=1), axis=0))

0 commit comments

Comments
 (0)