I am trying to do some (de)convolution with audio samples. I have one sample s and the same sample with some filters added on top of it s_f. Both samples are represented as numpy arrays. I want to deconvolve them in order to get an array that represents the isolated filter f. Once I do that I should be able to reproduce s_f using convolution of s and f.
Here's the code:
f = signal.deconvolve(s, s_f)
convolved = signal.convolve(s, f)
However, I get the following error on the second line:
ValueError: in1 and in2 should have the same rank
Does anyone know what am I doing wrong here?
Thanks much, omer