TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype('S64') dtype('S64') dtype('S64')
<p>I am trying to calculate periodogram using my code </p>

<pre><code>from scipy import signal
import numpy as np
import matplotlib.pyplot as plt

x = [line.rstrip('\n') for line in open('27000.dat')]
x = np.array(x)
fs=64

f, Pxx_den = signal.periodogram(x, fs)
plt.semilogy(f, Pxx_den)
plt.xlabel('frequency [Hz]')
plt.ylabel('PSD [V**2/Hz]')
plt.show()
</code></pre>

<p>But I got</p>

<pre><code>  File "m3.py", line 9, in &lt;module&gt;
    f, Pxx_den = signal.periodogram(x, fs)
  File "/home/milenko/miniconda2/lib/python2.7/site-packages/scipy/signal/spectral.py", line 141, in periodogram
    scaling, axis)
  File "/home/milenko/miniconda2/lib/python2.7/site-packages/scipy/signal/spectral.py", line 273, in welch
    return_onesided, scaling, axis)
  File "/home/milenko/miniconda2/lib/python2.7/site-packages/scipy/signal/spectral.py", line 391, in csd
    mode='psd')
  File "/home/milenko/miniconda2/lib/python2.7/site-packages/scipy/signal/spectral.py", line 824, in _spectral_helper
    scale = 1.0 / (fs * (win*win).sum())
TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype('S64') dtype('S64') dtype('S64')
</code></pre>

<p>Why?
I am on Ubuntu 16.04,Python 2.7.11.</p>