擅长:python、mysql、java
<p>您正在使用python <a href="https://docs.python.org/3/library/stdtypes.html#list" rel="nofollow">list</a>,其中应该使用<a href="http://docs.scipy.org/doc/numpy-1.10.0/reference/generated/numpy.array.html" rel="nofollow">numpy.array</a>。后者支持更丰富的<a href="http://docs.scipy.org/doc/numpy/reference/arrays.indexing.html" rel="nofollow">indexing</a></p>
<pre><code>import numpy as np
x = np.array([-0.04124324405924407, 0, 0.005249724476788287, 0.03599351958245578, -0.00252785423151014, 0.01007584102031178, -0.002510349639322063, -0.01264302961474806, -0.01797169063489579])
</code></pre>