Guest User

Untitled

a guest
Apr 20th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. from scipy import fft,ifft
  2. from numpy import concatenate, zeros
  3. def toeplitz_multiplication(a,v):
  4. n = len(a)
  5. c = concatenate((a[[0]],zeros(n),a[-1:0:-1]))
  6. vtilde = concatenate((v,zeros(n)))
  7. return ifft(fft(c)*fft(vtilde))[:n]
Add Comment
Please, Sign In to add comment