parameters: (cf, h=0.01, q=9)
return_statement: return (x, density)
docstring: Calculates pdf from cf using fft. Using region around 0 with N=2**q points
          separated by distance h. As suggested by [MS].
docstring_summary: Calculates pdf from cf using fft. Using region around 0 with N=2**q points
          separated by distance h. As suggested by [MS].
docstring_tokens: Calculates pdf from cf using fft . Using region around 0 with N = 2 ** q points separated by distance h . As suggested by [ MS ] .
function: def _pdf_from_cf_with_fft(cf, h=0.01, q=9):
          """Calculates pdf from cf using fft. Using region around 0 with N=2**q points
          separated by distance h. As suggested by [MS].
          """
          N = 2**q
          n = np.arange(1,N+1)
          density = ((-1)**(n-1-N/2))*np.fft.fft(((-1)**(n-1))*cf(2*np.pi*(n-1-N/2)/h/N))/h/N
          x = (n-1-N/2)*h
          return (x, density)
function_tokens: def _pdf_from_cf_with_fft ( cf , h = 0.01 , q = 9 ) : N = 2 ** q n = np . arange ( 1 , N + 1 ) density = ( ( - 1 ) ** ( n - 1 - N / 2 ) ) * np . fft . fft ( ( ( - 1 ) ** ( n - 1 ) ) * cf ( 2 * np . pi * ( n - 1 - N / 2 ) / h / N ) ) / h / N x = ( n - 1 - N / 2 ) * h return ( x , density )