SciPy
SciPy 是一款方便、易于使用、专为科学和工程设计的Python工具包,它包括统计、优化、整合、线性代数模块、傅里叶变换、信号和图像处理、常微分方程求解器等等。它和Numpy联系很密切,Scipy一般都是操控Numpy数组来进行科学计算,所以可以说是基于Numpy之上了。
安装方法
pip install numpy scipy matplotlib iPython jupyter pandas sympy nose
Scipy子模块
模块名 | 功能 |
---|---|
scipy.cluster | 向量量化 |
scipy.constants | 数学常量 |
scipy.fftpack | 快速傅里叶变换 |
scipy.integrate | 积分 |
scipy.interpolate | 插值 |
scipy.io | 插值 |
scipy.interpolate | 数据输入输出 |
scipy.linalg | 线性代数 |
scipy.ndimage | N维图像 |
scipy.odr | 正交距离回归 |
scipy.optimize | 优化算法 |
scipy.signal | 信号处理 |
scipy.sparse | 稀疏矩阵 |
scipy.spatial | 空间数据结构和算法 |
scipy.special | 特殊数学函数 |
scipy.stats | 统计函数 |
文件输入和输出:scipy.io
>>> from scipy import io as spio
>>> a = np.ones((3, 3))
>>> spio.savemat('file.mat', {'a': a}) # 保存字典到file.mat
>>> data = spio.loadmat('file.mat', struct_as_record=True)
>>> data['a']
array([[ 1., 1., 1.],
[ 1., 1., 1.],
[ 1., 1., 1.]])
线性代数操作:scipy.linalg
假如我们要计算一个方阵的行列式,我们需要调用det()函数:
>>> import numpy as np
>>> from scipy import linalg
>>> arr = np.array([[1,2],[3,4]])
>>> linalg.det(arr)
-2.0
>>> arr = np.array([[3,2],[6,4]])
>>> linalg.det(arr)
0.0
比如求一个矩阵的转置:
>>> arr = np.array([[1,2],[3,4]])
>>> iarr = linalg.inv(arr)
>>> iarr
array([[-2. , 1. ],
[ 1.5, -0.5]])
快速傅里叶变换:scipy.fftpack
首先我们用numpy初始化正弦信号:
>>> import numpy as np
>>> time_step = 0.02
>>> period = 5.
>>> time_vec = np.arange(0, 20, time_step)
>>> sig = np.sin(2 * np.pi / period * time_vec) + 0.5 * np.random.randn(time_vec.size)
>>> time_vec
array([ 0. , 0.02, 0.04, 0.06, 0.08, 0.1 , 0.12, 0.14,
0.16, 0.18, 0.2 , 0.22, 0.24, 0.26, 0.28, 0.3 ,
0.32, 0.34, 0.36, 0.38, 0.4 , 0.42, 0.44, 0.46,
0.48, 0.5 , 0.52, 0.54, 0.56, 0.58, 0.6 , 0.62,
0.64, 0.66, 0.68, 0.7 , 0.72, 0.74, 0.76, 0.78,
0.8 , 0.82, 0.84, 0.86, 0.88, 0.9 , 0.92, 0.94,
0.96, 0.98, 1. , 1.02, 1.04, 1.06, 1.08, 1.1 ,
1.12, 1.14, 1.16, 1.18, 1.2 , 1.22, 1.24, 1.26,
1.28, 1.3 , 1.32, 1.34, 1.36, 1.38, 1.4 , 1.42,
1.44, 1.46, 1.48, 1.5 , 1.52, 1.54, 1.56, 1.58,
1.6 , 1.62, 1.64, 1.66, 1.68, 1.7 , 1.72, 1.74,
1.76, 1.78, 1.8 , 1.82, 1.84, 1.86, 1.88, 1.9 ,
1.92, 1.94, 1.96, 1.98, 2. , 2.02, 2.04, 2.06,
2.08, 2.1 , 2.12, 2.14, 2.16, 2.18, 2.2 , 2.22,
2.24, 2.26, 2.28, 2.3 , 2.32, 2.34, 2.36, 2.38,
2.4 , 2.42, 2.44, 2.46, 2.48, 2.5 , 2.52, 2.54,
2.56, 2.58, 2.6 , 2.62, 2.64, 2.66, 2.68, 2.7 ,
2.72, 2.74, 2.76, 2.78, 2.8 , 2.82, 2.84, 2.86,
2.88, 2.9 , 2.92, 2.94, 2.96, 2.98, 3. , 3.02,
3.04, 3.06, 3.08, 3.1 , 3.12, 3.14, 3.16, 3.18,
3.2 , 3.22, 3.24, 3.26, 3.28, 3.3 , 3.32, 3.34,
3.36, 3.38, 3.4 , 3.42, 3.44, 3.46, 3.48, 3.5 ,
3.52, 3.54, 3.56, 3.58, 3.6 , 3.62, 3.64, 3.66,
3.68, 3.7 , 3.72, 3.74, 3.76, 3.78, 3.8 , 3.82,
3.84, 3.86, 3.88, 3.9 , 3.92, 3.94, 3.96, 3.98,
4. , 4.02, 4.04, 4.06, 4.08, 4.1 , 4.12, 4.14,
4.16, 4.18, 4.2 , 4.22, 4.24, 4.26, 4.28, 4.3 ,
4.32, 4.34, 4.36, 4.38, 4.4 , 4.42, 4.44, 4.46,
4.48, 4.5 , 4.52, 4.54, 4.56, 4.58, 4.6 , 4.62,
4.64, 4.66, 4.68, 4.7 , 4.72, 4.74, 4.76, 4.78,
4.8 , 4.82, 4.84, 4.86, 4.88, 4.9 , 4.92, 4.94,
4.96, 4.98, 5. , 5.02, 5.04, 5.06, 5.08, 5.1 ,
5.12, 5.14, 5.16, 5.18, 5.2 , 5.22, 5.24, 5.26,
5.28, 5.3 , 5.32, 5.34, 5.36, 5.38, 5.4 , 5.42,
5.44, 5.46, 5.48, 5.5 , 5.52, 5.54, 5.56, 5.58,
5.6 , 5.62, 5.64, 5.66, 5.68, 5.7 , 5.72, 5.74,
5.76, 5.78, 5.8 , 5.82, 5.84, 5.86, 5.88, 5.9 ,
5.92, 5.94, 5.96, 5.98, 6. , 6.02, 6.04, 6.06,
6.08, 6.1 , 6.12, 6.14, 6.16, 6.18, 6.2 , 6.22,
6.24, 6.26, 6.28, 6.3 , 6.32, 6.34, 6.36, 6.38,
6.4 , 6.42, 6.44, 6.46, 6.48, 6.5 , 6.52, 6.54,
6.56, 6.58, 6.6 , 6.62, 6.64, 6.66, 6.68, 6.7 ,
6.72, 6.74, 6.76, 6.78, 6.8 , 6.82, 6.84, 6.86,
6.88, 6.9 , 6.92, 6.94, 6.96, 6.98, 7. , 7.02,
7.04, 7.06, 7.08, 7.1 , 7.12, 7.14, 7.16, 7.18,
7.2 , 7.22, 7.24, 7.26, 7.28, 7.3 , 7.32, 7.34,
7.36, 7.38, 7.4 , 7.42, 7.44, 7.46, 7.48, 7.5 ,
7.52, 7.54, 7.56, 7.58, 7.6 , 7.62, 7.64, 7.66,
7.68, 7.7 , 7.72, 7.74, 7.76, 7.78, 7.8 , 7.82,
7.84, 7.86, 7.88, 7.9 , 7.92, 7.94, 7.96, 7.98,
8. , 8.02, 8.04, 8.06, 8.08, 8.1 , 8.12, 8.14,
8.16, 8.18, 8.2 , 8.22, 8.24, 8.26, 8.28, 8.3 ,
8.32, 8.34, 8.36, 8.38, 8.4 , 8.42, 8.44, 8.46,
8.48, 8.5 , 8.52, 8.54, 8.56, 8.58, 8.6 , 8.62,
8.64, 8.66, 8.68, 8.7 , 8.72, 8.74, 8.76, 8.78,
8.8 , 8.82, 8.84, 8.86, 8.88, 8.9 , 8.92, 8.94,
8.96, 8.98, 9. , 9.02, 9.04, 9.06, 9.08, 9.1 ,
9.12, 9.14, 9.16, 9.18, 9.2 , 9.22, 9.24, 9.26,
9.28, 9.3 , 9.32, 9.34, 9.36, 9.38, 9.4 , 9.42,
9.44, 9.46, 9.48, 9.5 , 9.52, 9.54, 9.56, 9.58,
9.6 , 9.62, 9.64, 9.66, 9.68, 9.7 , 9.72, 9.74,
9.76, 9.78, 9.8 , 9.82, 9.84, 9.86, 9.88, 9.9 ,
9.92, 9.94, 9.96, 9.98, 10. , 10.02, 10.04, 10.06,
10.08, 10.1 , 10.12, 10.14, 10.16, 10.18, 10.2 , 10.22,
10.24, 10.26, 10.28, 10.3 , 10.32, 10.34, 10.36, 10.38,
10.4 , 10.42, 10.44, 10.46, 10.48, 10.5 , 10.52, 10.54,
10.56, 10.58, 10.6 , 10.62, 10.64, 10.66, 10.68, 10.7 ,
10.72, 10.74, 10.76, 10.78, 10.8 , 10.82, 10.84, 10.86,
10.88, 10.9 , 10.92, 10.94, 10.96, 10.98, 11. , 11.02,
11.04, 11.06, 11.08, 11.1 , 11.12, 11.14, 11.16, 11.18,
11.2 , 11.22, 11.24, 11.26, 11.28, 11.3 , 11.32, 11.34,
11.36, 11.38, 11.4 , 11.42, 11.44, 11.46, 11.48, 11.5 ,
11.52, 11.54, 11.56, 11.58, 11.6 , 11.62, 11.64, 11.66,
11.68, 11.7 , 11.72, 11.74, 11.76, 11.78, 11.8 , 11.82,
11.84, 11.86, 11.88, 11.9 , 11.92, 11.94, 11.96, 11.98,
12. , 12.02, 12.04, 12.06, 12.08, 12.1 , 12.12, 12.14,
12.16, 12.18, 12.2 , 12.22, 12.24, 12.26, 12.28, 12.3 ,
12.32, 12.34, 12.36, 12.38, 12.4 , 12.42, 12.44, 12.46,
12.48, 12.5 , 12.52, 12.54, 12.56, 12.58, 12.6 , 12.62,
12.64, 12.66, 12.68, 12.7 , 12.72, 12.74, 12.76, 12.78,
12.8 , 12.82, 12.84, 12.86, 12.88, 12.9 , 12.92, 12.94,
12.96, 12.98, 13. , 13.02, 13.04, 13.06, 13.08, 13.1 ,
13.12, 13.14, 13.16, 13.18, 13.2 , 13.22, 13.24, 13.26,
13.28, 13.3 , 13.32, 13.34, 13.36, 13.38, 13.4 , 13.42,
13.44, 13.46, 13.48, 13.5 , 13.52, 13.54, 13.56, 13.58,
13.6 , 13.62, 13.64, 13.66, 13.68, 13.7 , 13.72, 13.74,
13.76, 13.78, 13.8 , 13.82, 13.84, 13.86, 13.88, 13.9 ,
13.92, 13.94, 13.96, 13.98, 14. , 14.02, 14.04, 14.06,
14.08, 14.1 , 14.12, 14.14, 14.16, 14.18, 14.2 , 14.22,
14.24, 14.26, 14.28, 14.3 , 14.32, 14.34, 14.36, 14.38,
14.4 , 14.42, 14.44, 14.46, 14.48, 14.5 , 14.52, 14.54,
14.56, 14.58, 14.6 , 14.62, 14.64, 14.66, 14.68, 14.7 ,
14.72, 14.74, 14.76, 14.78, 14.8 , 14.82, 14.84, 14.86,
14.88, 14.9 , 14.92, 14.94, 14.96, 14.98, 15. , 15.02,
15.04, 15.06, 15.08, 15.1 , 15.12, 15.14, 15.16, 15.18,
15.2 , 15.22, 15.24, 15.26, 15.28, 15.3 , 15.32, 15.34,
15.36, 15.38, 15.4 , 15.42, 15.44, 15.46, 15.48, 15.5 ,
15.52, 15.54, 15.56, 15.58, 15.6 , 15.62, 15.64, 15.66,
15.68, 15.7 , 15.72, 15.74, 15.76, 15.78, 15.8 , 15.82,
15.84, 15.86, 15.88, 15.9 , 15.92, 15.94, 15.96, 15.98,
16. , 16.02, 16.04, 16.06, 16.08, 16.1 , 16.12, 16.14,
16.16, 16.18, 16.2 , 16.22, 16.24, 16.26, 16.28, 16.3 ,
16.32, 16.34, 16.36, 16.38, 16.4 , 16.42, 16.44, 16.46,
16.48, 16.5 , 16.52, 16.54, 16.56, 16.58, 16.6 , 16.62,
16.64, 16.66, 16.68, 16.7 , 16.72, 16.74, 16.76, 16.78,
16.8 , 16.82, 16.84, 16.86, 16.88, 16.9 , 16.92, 16.94,
16.96, 16.98, 17. , 17.02, 17.04, 17.06, 17.08, 17.1 ,
17.12, 17.14, 17.16, 17.18, 17.2 , 17.22, 17.24, 17.26,
17.28, 17.3 , 17.32, 17.34, 17.36, 17.38, 17.4 , 17.42,
17.44, 17.46, 17.48, 17.5 , 17.52, 17.54, 17.56, 17.58,
17.6 , 17.62, 17.64, 17.66, 17.68, 17.7 , 17.72, 17.74,
17.76, 17.78, 17.8 , 17.82, 17.84, 17.86, 17.88, 17.9 ,
17.92, 17.94, 17.96, 17.98, 18. , 18.02, 18.04, 18.06,
18.08, 18.1 , 18.12, 18.14, 18.16, 18.18, 18.2 , 18.22,
18.24, 18.26, 18.28, 18.3 , 18.32, 18.34, 18.36, 18.38,
18.4 , 18.42, 18.44, 18.46, 18.48, 18.5 , 18.52, 18.54,
18.56, 18.58, 18.6 , 18.62, 18.64, 18.66, 18.68, 18.7 ,
18.72, 18.74, 18.76, 18.78, 18.8 , 18.82, 18.84, 18.86,
18.88, 18.9 , 18.92, 18.94, 18.96, 18.98, 19. , 19.02,
19.04, 19.06, 19.08, 19.1 , 19.12, 19.14, 19.16, 19.18,
19.2 , 19.22, 19.24, 19.26, 19.28, 19.3 , 19.32, 19.34,
19.36, 19.38, 19.4 , 19.42, 19.44, 19.46, 19.48, 19.5 ,
19.52, 19.54, 19.56, 19.58, 19.6 , 19.62, 19.64, 19.66,
19.68, 19.7 , 19.72, 19.74, 19.76, 19.78, 19.8 , 19.82,
19.84, 19.86, 19.88, 19.9 , 19.92, 19.94, 19.96, 19.98])
>>> sig
array([ -2.93061365e-01, 5.30383599e-01, -7.86370317e-04,
1.74994340e-02, -4.00626581e-01, 3.98398431e-01,
3.42639567e-02, -6.53931036e-02, -1.60064023e-03,
-8.97586494e-01, 1.20580358e-01, -1.22774216e-01,
3.41717628e-01, 3.29396885e-01, 2.71381465e-01,
-2.73727232e-01, 5.84773311e-01, -3.96603527e-01,
3.36738802e-01, 5.33249224e-01, 8.09188994e-01,
6.16943664e-01, 9.41794048e-01, 1.57217093e+00,
5.04685129e-01, 8.07153869e-01, 1.69752076e+00,
5.71163945e-01, 8.62580691e-01, 5.74879584e-02,
7.94747235e-01, 5.03786115e-01, 8.99139226e-01,
6.52174251e-01, 8.07423267e-01, 1.16583534e-01,
9.60585385e-01, 1.36413672e+00, -3.24389404e-02,
-2.92449427e-01, 8.61060088e-01, 1.55747607e+00,
8.83334027e-01, 9.82984623e-01, 6.85542375e-01,
1.94259820e-01, 1.10254845e-01, 7.34512698e-01,
1.39866177e+00, 4.64662031e-01, 9.95219483e-01,
7.07519649e-01, 1.23160486e+00, 2.36767343e-01,
4.75380302e-01, 1.11754658e+00, 1.19468090e+00,
9.32997486e-01, 1.01038191e+00, 1.15856960e+00,
1.99480246e+00, 1.34766857e+00, 9.43238862e-01,
4.84596263e-01, 9.26676312e-01, 1.26340466e+00,
5.12428418e-01, 6.27235106e-01, 1.17578533e+00,
1.55764087e+00, 8.93571365e-01, 3.10470631e-01,
4.95802522e-01, 1.16142975e+00, 1.27039352e+00,
1.31633868e+00, 1.18593599e+00, 3.07263457e-01,
9.11270627e-01, 5.94357333e-01, 3.54458727e-01,
-8.94667775e-02, 1.23122235e+00, 8.56676212e-01,
2.74555416e-01, 1.58927970e-01, 1.52997615e+00,
1.01712751e+00, 1.28028751e-02, 1.98422137e+00,
4.51400974e-01, 7.96112447e-01, 8.19000835e-01,
1.90891585e+00, 9.04393382e-01, 2.03910499e-01,
7.68422390e-01, -1.82638197e-01, 6.58540255e-01,
5.50297803e-01, 9.66490279e-01, 5.21687006e-01,
7.15277298e-01, 7.07519489e-01, 1.53324824e-01,
9.69425488e-02, -2.29997637e-03, 1.08177960e-02,
6.96045685e-01, 4.64431255e-01, 6.29775702e-01,
-4.16012523e-01, -1.30210340e-03, -2.09754408e-01,
1.55144428e-01, 1.54505989e-01, 6.54218639e-01,
7.53668750e-01, 1.31010811e-01, 1.14102603e-01,
-2.71547410e-01, 7.27897650e-01, 4.10680433e-01,
-1.57141119e-01, 7.32861087e-01, 1.56043065e-01,
6.83736437e-01, 1.35222381e-01, -7.12529673e-02,
-2.80339432e-02, 5.26768559e-01, -7.16710284e-01,
-2.59366660e-01, -3.96207291e-01, -9.72489776e-01,
-2.36314201e-01, -5.95575022e-01, -7.95455490e-01,
-7.00804281e-01, 1.23742557e-01, -5.14575141e-01,
1.60481984e-01, -1.19447383e+00, -1.26820616e-01,
-9.85165338e-01, -5.33921036e-01, -1.32061199e+00,
-4.09534800e-01, -7.24462364e-01, -6.69272312e-01,
-3.73749627e-01, -3.28131803e-01, -7.32815690e-02,
-6.57413726e-01, -1.39742590e+00, -1.34532818e+00,
-4.43693186e-02, -3.07525352e-01, -2.67572179e-01,
-1.34921678e+00, -5.80931986e-01, -2.60574257e-01,
-5.36740956e-01, -1.67078264e+00, -1.47498820e+00,
-6.85598652e-01, -1.39832957e+00, -1.41001620e+00,
-1.42059291e-01, -8.44455893e-01, -7.61067108e-01,
-7.83881581e-01, -9.31292278e-01, -3.95430909e-01,
-1.05723303e+00, -1.36372162e+00, -9.44235485e-01,
-9.80532721e-01, -2.76094282e-01, -9.44703328e-01,
-9.66490088e-01, -6.89958892e-01, -1.31514928e+00,
-5.00789754e-01, -9.09349476e-01, -7.15899428e-01,
-9.04283401e-01, -6.65353370e-01, -5.57884960e-01,
-8.31588604e-01, -8.69471764e-01, -1.50629799e+00,
-5.74604102e-01, -4.25208267e-01, -1.12595627e+00,
-2.03770880e-01, -1.20871569e+00, -5.66338769e-01,
-1.11128101e+00, -9.00090785e-01, -1.30618012e+00,
-9.93153914e-01, -4.79937889e-01, -6.05025564e-01,
-1.20848766e+00, 1.14094247e-01, -1.07667907e-01,
-1.72077243e+00, 7.98020330e-02, -4.07745726e-01,
-1.17493353e+00, -8.59395460e-01, -1.45554672e+00,
-4.41884867e-01, -7.05359919e-01, -4.47513566e-01,
-1.10823838e+00, -2.00488234e-01, -5.22921471e-01,
-1.03825872e+00, -5.21339369e-04, -5.64949626e-01,
-3.49073503e-01, -9.16730497e-01, -1.83943501e+00,
-2.62080910e-01, -6.71249545e-01, -3.08455576e-01,
-5.67330456e-02, -5.57832898e-01, -8.31544496e-01,
-3.72480493e-01, -4.84647989e-01, -9.67571869e-01,
-4.67879634e-01, -6.93935391e-01, -4.16381765e-01,
5.90474384e-01, -9.52995472e-01, -3.71775445e-01,
-2.83067691e-01, -7.41163157e-01, -1.10789452e+00,
2.86401105e-01, 2.00736389e-01, -7.55584226e-02,
-3.10052458e-01, -2.96762745e-01, -1.28275058e-01,
6.84287131e-01, -4.67745200e-01, -1.17043956e+00,
6.52014728e-01, 6.45613600e-01, 5.47059315e-01,
7.93297338e-01, -4.89486230e-01, 3.35264385e-01,
4.49610772e-01, 1.76029656e-01, -1.23878916e-01,
1.10948065e+00, -3.03361658e-01, 9.72584916e-02,
-2.71865649e-01, -3.77260872e-01, 7.29011555e-01,
-6.21677362e-01, 1.19646906e+00, 1.09444477e+00,
1.36376464e+00, 2.43205908e-02, 6.58978509e-01,
6.38967098e-01, 6.46744052e-01, 2.26331531e-01,
-1.16949298e-01, -3.21334006e-01, 1.40535651e+00,
3.36323112e-01, 3.81769523e-01, 5.09059025e-01,
9.99055260e-01, 8.65163442e-01, 8.57284639e-01,
3.34118937e-01, 6.16426124e-01, 2.41023661e-01,
6.47934871e-01, 2.12929476e+00, 6.60177207e-01,
1.13537888e+00, 8.80492745e-01, 1.89431967e-01,
1.09813196e+00, 1.22001822e+00, 2.79824462e-01,
2.27808790e-01, 2.43606305e-02, 3.34457747e-01,
1.06655689e+00, 9.02927835e-01, 1.63229973e+00,
1.44029293e+00, 9.70104781e-01, 1.20579832e+00,
1.01656146e+00, 5.47902579e-01, 1.01913416e+00,
9.06869951e-01, 1.54031503e+00, 1.71183624e+00,
8.76562422e-01, 9.16852731e-01, 5.71891076e-01,
1.48370489e+00, 7.35440024e-01, 1.38979614e+00,
1.75805301e+00, 7.39359518e-01, 1.32284801e+00,
1.06147065e+00, 5.90998471e-01, 1.52755188e+00,
1.58029533e+00, 9.54801244e-01, 1.06654255e+00,
6.91840721e-01, 4.78287318e-01, 5.33489800e-01,
6.79504763e-01, 6.48565062e-01, 1.04047557e+00,
5.67826020e-01, 1.19299404e+00, 1.71812738e+00,
1.14586446e+00, 8.17739836e-01, 1.11263375e+00,
2.72781812e-01, 6.57776304e-01, 3.96307505e-01,
3.28545323e-01, 4.14891420e-01, 1.51671117e-01,
-2.10508416e-01, 1.05492970e+00, 1.60688325e+00,
8.77029592e-01, 2.45421553e-01, 3.48562179e-01,
6.12027140e-01, 1.14808100e+00, 7.07888201e-01,
6.67558104e-01, 1.22473199e+00, 5.80798270e-01,
1.04708997e+00, 4.84643384e-01, -1.68104691e-01,
6.10773517e-01, 1.23663675e+00, 7.21791946e-01,
-1.78870762e-01, 5.14613281e-01, 2.99134706e-01,
8.89499012e-01, -1.10983270e-01, -3.33137036e-01,
-2.61437840e-01, 2.12689276e-01, 1.52354861e-01,
1.85788747e-01, 5.88013606e-01, 3.96324197e-02,
-1.47390816e-01, 1.21032722e-01, -2.35784732e-01,
-1.04991925e+00, 6.32386915e-02, -3.89073527e-01,
7.10753724e-01, -3.68513526e-01, 1.17634477e-01,
-8.62219392e-01, -5.17963158e-01, -6.24541842e-02,
3.82295234e-01, -6.43462402e-01, -1.45475037e+00,
-3.18115355e-01, -9.60759655e-01, -7.08928367e-01,
-7.21024591e-01, 1.91426653e-01, 1.14867132e-01,
1.56290374e-02, -1.12947150e+00, -1.45262112e+00,
2.35435927e-01, -4.27432104e-01, 2.26839385e-01,
-4.47170246e-01, -1.85589985e+00, -1.48748503e+00,
3.87366648e-01, -1.04725178e+00, -1.58120431e-01,
-1.50893068e+00, 1.55495027e-01, -8.74973996e-01,
-9.98611963e-01, -1.48817957e+00, -1.10916590e+00,
-2.70607769e-01, -1.88440935e+00, -9.76466161e-01,
-8.99733116e-01, -1.37994792e+00, -1.00141029e+00,
-6.46986725e-01, -4.93840335e-01, -1.77891848e-01,
-1.33976585e+00, -9.91577934e-01, -1.40572604e+00,
1.69453070e-03, -1.43166138e+00, -4.05555908e-01,
-7.06307848e-01, -9.13961677e-01, -1.31872942e+00,
-1.66984644e+00, -1.32222903e+00, -1.22807609e+00,
-1.75791855e+00, -1.15863288e+00, -1.68474879e+00,
-1.18580308e+00, -1.13120619e+00, -8.08945109e-01,
-9.57261099e-01, -1.02210077e+00, -6.43364526e-01,
-3.68418419e-01, -6.27389638e-01, -9.76694748e-01,
-7.54899625e-01, -6.28637844e-01, -9.06927399e-01,
-8.86997256e-01, -1.72049305e+00, -1.00735280e+00,
-7.10145251e-01, -5.59491320e-01, -1.32643203e+00,
-1.21425171e+00, -1.72094575e+00, -1.34527849e+00,
-6.95680155e-01, -9.36337039e-01, -9.87511207e-01,
-1.95608494e+00, -8.41193444e-01, -6.54715657e-01,
-4.56041303e-01, -1.89983365e-01, -4.82629210e-01,
-9.72129815e-01, -1.98143009e-01, -6.84224889e-01,
-2.89842771e-01, -6.85961801e-01, -1.21460619e-03,
-2.82104611e-01, -6.08038614e-01, -1.81734782e-01,
-4.86754825e-01, -6.94215526e-01, -3.90704995e-01,
2.71794772e-02, -7.14350075e-01, -9.56965375e-01,
-6.31053438e-01, -3.80390895e-01, 4.01171288e-01,
-1.75996189e+00, 1.42505869e-01, 1.44515723e-02,
-1.42766604e-01, -8.19189642e-01, -6.39652116e-01,
-7.96982791e-01, 2.37758692e-01, 1.77893863e-02,
-4.43917460e-01, -1.26050371e-01, -1.42299717e-02,
-3.43156443e-01, 7.08802326e-01, -2.01044957e-01,
4.10596006e-01, 7.46819681e-01, 1.60212406e-01,
-3.91234077e-02, -1.48324665e-01, 1.49326021e-01,
3.44727902e-01, 8.10949344e-01, 4.66268618e-01,
3.05503426e-02, 1.76652385e-01, -2.52678886e-01,
-5.60613253e-01, 1.22071833e+00, 4.68828457e-01,
1.36168661e+00, -2.74145000e-01, 1.46173102e+00,
6.04168753e-01, 3.69509015e-01, 4.47745253e-01,
1.24049876e+00, 7.29679100e-01, 6.25037870e-01,
1.26586594e+00, 1.04425457e+00, 1.19377762e+00,
1.16187489e+00, 1.10263742e-01, 6.96615549e-01,
9.75333371e-01, 4.68900067e-02, 1.07482717e+00,
1.04959115e+00, 7.76421728e-01, 4.00112966e-01,
1.84974387e-01, 1.82940701e-01, -1.70858763e-01,
4.64067480e-01, 7.40549988e-01, 1.46045800e+00,
6.03501763e-01, 1.30490776e+00, 2.07284210e+00,
9.76751859e-01, 2.49993636e-01, 3.16648545e-01,
1.21123237e+00, 1.39937283e+00, 1.28558780e+00,
9.87829297e-01, 1.08690846e+00, 5.40366085e-01,
1.24973464e+00, 2.13376199e+00, 1.44373399e+00,
9.59848028e-01, 7.07062817e-01, 1.18694259e+00,
4.33922873e-01, 1.22167710e+00, 1.13853587e+00,
1.56606841e+00, 6.17346358e-01, 9.22101449e-01,
1.31743189e+00, 7.10748136e-01, 1.42637088e+00,
1.24752399e+00, 1.66874398e+00, 9.66084790e-02,
1.65285658e+00, 1.09875828e+00, 1.12973897e+00,
1.75371519e+00, 1.87781214e+00, 8.47149413e-01,
1.30844958e+00, 4.27709030e-01, 9.24001812e-01,
6.93690643e-01, 5.25188049e-01, 3.14571399e-01,
4.73269986e-01, 9.79302101e-01, 1.18272256e+00,
8.37711699e-01, 5.82788646e-01, 5.66837730e-01,
1.38787976e+00, 1.30087409e+00, 1.55252133e+00,
1.55851025e+00, 5.66512057e-01, 5.89078812e-01,
1.17137851e+00, 5.41435021e-01, 1.12248920e+00,
-5.70594477e-02, -1.29368423e-02, 2.65040215e-01,
6.61708747e-02, -1.03260239e-01, 8.15950769e-02,
2.19022093e-02, 1.28729656e+00, -9.37284191e-02,
9.36101934e-01, 5.58245110e-01, -2.55557465e-02,
-3.73049138e-01, 1.52865390e-01, -4.86720778e-01,
-3.89955018e-01, 3.50290154e-01, 5.59378104e-01,
1.87915548e-01, -1.32246536e-01, 7.71761841e-02,
-9.02153528e-01, -4.90408315e-01, 7.33352999e-01,
-4.14883264e-01, 6.74245451e-01, 9.81005186e-01,
-2.87341911e-01, -2.61227613e-01, -5.08096339e-01,
-4.99903448e-01, 1.26963492e+00, -5.42170610e-01,
-8.44064803e-01, -5.59360409e-01, 7.18810607e-02,
-5.55581927e-01, -7.72096042e-01, 4.20940150e-01,
-6.12980388e-02, -7.93917079e-01, -1.14190667e+00,
-1.02771962e+00, -5.21186483e-01, 3.37026537e-01,
-6.40349136e-01, -5.41546945e-01, -4.90877205e-01,
-1.55785846e-01, -6.08417871e-01, 4.57908132e-01,
-1.23472235e+00, -8.29116782e-01, -1.16865353e+00,
-2.22648745e-01, -3.75327256e-01, -1.29317750e+00,
4.54038320e-01, -5.47806266e-01, -9.40380534e-01,
-1.07531382e+00, -1.57119175e+00, -1.15410344e+00,
-6.74306357e-01, -6.72539193e-01, -1.07452340e+00,
-3.66554088e-01, -1.15323950e+00, -6.85732340e-01,
-6.30650316e-01, -2.01762870e+00, -1.33881832e+00,
5.55527115e-02, -7.90986047e-01, -1.42631598e+00,
-1.10700927e+00, -1.70066694e-01, -9.59821399e-01,
-5.66999502e-01, -1.13280544e+00, -8.51290172e-01,
-9.04973690e-01, -1.11645166e+00, -3.65570071e-01,
-1.13344626e+00, -1.18440467e-01, -1.31458445e+00,
-1.71592749e+00, -4.07384969e-01, -1.06268925e+00,
-1.36425286e+00, -4.11744168e-01, -1.52385235e+00,
-1.58543370e+00, -7.33242502e-01, -6.86578035e-01,
-7.03533917e-01, -1.29536217e+00, -1.23020907e+00,
-1.09016260e+00, -2.16703954e-01, -1.11932411e+00,
-2.07505061e+00, -5.22801274e-01, -2.62214710e-01,
-2.22294275e+00, -6.43947657e-01, -7.82581483e-01,
-9.82166481e-01, -7.16426274e-01, -1.53312154e+00,
-1.49104375e+00, -1.28008135e+00, -7.45907514e-01,
-1.33713080e+00, -2.92764191e-01, -1.36709298e+00,
-6.66761296e-01, -3.18699126e-02, -3.79159191e-01,
-1.20712297e+00, -1.41593345e+00, -1.95152870e-01,
1.32347403e-01, -6.57796306e-01, -2.15701774e-01,
-1.32869108e+00, -1.24589550e+00, -9.86347876e-05,
-2.79960522e-01, -4.62455069e-01, -3.84384950e-01,
-1.51177165e+00, 1.50300635e-01, -5.56299252e-01,
-4.20050913e-01, -2.48410995e-01, 5.05348181e-02,
4.76478543e-01, -2.68310134e-01, -4.55180570e-01,
-5.50761198e-01, 1.67137517e-01, -1.27251071e+00,
3.60703427e-01, 5.85267953e-01, -7.99407861e-01,
-6.80395899e-01, -1.14294196e+00, 7.31789788e-01,
5.12145463e-01, -4.54721288e-02, 9.18881373e-01,
2.07418456e-01, 3.65191979e-01, 3.44465834e-02,
7.75223381e-01, -3.19261417e-01, 2.57539079e-01,
-1.35865596e-01, 3.62933134e-01, 9.84782606e-01,
-1.66166717e-02, 3.71092931e-01, 9.91333321e-01,
5.37885420e-01, 9.55501762e-02, 9.14286503e-01,
3.26741909e-01, 8.28347695e-01, 2.04495644e-01,
3.48590111e-02, 1.19919050e+00, -1.84337243e-01,
7.17213737e-01, 9.32750525e-01, 5.34284854e-01,
9.06469779e-01, -1.01417197e+00, 1.18807247e+00,
1.46118198e+00, 6.63311109e-01, 2.04828683e-01,
5.67690850e-01, 4.88243074e-01, 4.18356798e-01,
2.13969960e-01, 5.37927342e-01, 5.33650878e-01,
1.05484924e+00, 1.70660468e+00, 5.75931982e-01,
6.11882438e-01, 7.75358377e-01, 1.93768873e+00,
8.11220265e-01, 5.39282672e-01, 1.37290867e+00,
2.25221019e+00, 1.17108564e+00, 6.62090577e-01,
3.27928834e-01, 7.02079935e-01, 1.18269829e+00,
8.64395472e-01, 1.30922225e+00, 4.42833236e-01,
7.33538898e-01, 2.63235893e-01, 1.18445075e+00,
1.40218612e+00, 2.68572414e-01, 1.44000866e+00,
6.82311088e-01, 8.22875163e-01, 1.04014240e+00,
1.06002892e+00, 1.28432881e+00, 9.56290581e-01,
6.83732426e-01, 1.00426917e+00, 1.18808786e+00,
8.55870285e-01, 1.57705360e+00, 9.27119940e-01,
1.20263930e+00, 1.98014967e+00, 1.61704210e+00,
6.91991248e-01, 4.29015928e-01, 1.61845142e+00,
5.95862527e-01, 1.20783676e+00, 8.00959630e-01,
4.03552269e-01, 6.08698965e-01, 9.33723770e-01,
5.35211574e-01, 5.97611913e-01, 9.54356802e-01,
-5.39839496e-01, 9.15094763e-01, 1.51660578e+00,
4.14232758e-01, 1.95546238e-02, 5.65787515e-01,
1.02266564e+00, 1.09555792e+00, 1.78059208e-01,
8.22044834e-02, -2.97634331e-02, 3.60735951e-01,
1.08086348e-01, 8.14062977e-01, 5.92043687e-01,
-7.25166138e-02, 4.36411227e-01, 2.36228507e-01,
-1.83551188e-01, 9.94249725e-01, -3.13592223e-01,
2.87317995e-01, -8.81487971e-02, 4.05498093e-01,
1.03275115e+00, 1.13139439e+00, -5.46129702e-01,
5.07464265e-01, 3.80709428e-01, 2.91916739e-01,
-1.97132773e-02, -6.31371938e-01, -5.17373683e-01,
3.01970931e-01, -1.19525372e-01, 1.29283653e+00,
-4.50803180e-02, -1.91327328e-01, 6.04364138e-01,
-5.17796843e-01, -5.13743851e-01, 4.73965318e-01,
1.38439451e-01, 2.79586072e-02, -1.94675677e-01,
-2.84381471e-01, -4.86298620e-01, 7.77470918e-02,
-5.46122656e-01, 2.53678515e-01, -5.30758034e-01,
-6.68854400e-01, -8.45328585e-01, -5.10390946e-01,
-1.30973487e-01, -3.85793312e-01, -4.84796447e-01,
-1.85481625e-01, 1.85771464e-01, -1.10359786e+00,
-8.74732669e-01, 3.37954409e-01, -4.98165063e-01,
-3.60473751e-01, -9.43945608e-01, 1.53152765e-02,
-2.21379035e-01, 1.49943031e-01, -7.48180170e-01,
-9.02072102e-01, -2.74826994e-01, -6.40918135e-01,
-2.97112657e-01, -5.73778823e-01, -2.65930184e-01,
-1.01752260e+00, 4.98390423e-02, -1.38496180e+00,
-1.31034342e+00, -8.22925329e-01, -5.14387760e-01,
-5.55291484e-01, -7.44087222e-01, -1.24016589e+00,
-1.24455738e+00, -1.00397391e+00, -6.92477433e-01,
-1.49150394e-01, -9.93578145e-01, -6.25422827e-01,
-2.27897143e-01, -1.00996502e+00, -5.19691946e-01,
-1.97245789e+00, -2.40411681e+00, -9.82607052e-01,
-2.00178621e+00, -9.58794942e-01, -8.94170182e-01,
-7.55280731e-01, -8.63311494e-01, -9.48613447e-01,
-1.13186883e+00, -1.15562557e+00, -1.19627993e+00,
-1.45625911e+00, -1.51048876e+00, -1.76473751e+00,
-1.62280892e+00, -1.80265764e+00, -7.30030197e-01,
-1.05876885e+00, -5.76400056e-01, -1.16032351e+00,
-9.44873073e-01, -1.19486745e+00, -1.16980465e+00,
-9.97985974e-01, -1.39407822e+00, -8.07700068e-01,
-6.97630442e-01, -7.77250640e-01, -1.01880818e+00,
-2.86262286e-01, -5.88550031e-01, 1.36685859e-01,
-1.95396284e-01, -9.44213003e-01, -8.14306001e-01,
-4.82555931e-01, -6.41484212e-01, -3.98750376e-02,
-4.59358721e-01, -1.31064516e+00, -7.35574830e-01,
-3.53728984e-01, 2.58430322e-01, -9.24322573e-01,
9.25672220e-02, -2.01203440e-02, -5.58450651e-01,
-6.60814093e-02, 5.87296449e-01, 1.80829630e-02,
-3.76386091e-01, -8.76378996e-01, 1.14408355e-01,
-3.59976783e-01, -6.80233282e-01, -1.72491654e+00,
-5.31794299e-01, -2.54116956e-01, -1.11423777e+00,
-1.09024460e-01, -2.81376585e-01, -3.24903951e-01,
-6.01183552e-01, 1.23278244e-01, 1.29714399e-01,
-5.14855614e-01])
如果我们要计算该信号的采样频率,可以用scipy.fftpack.fftreq()函数
计算它的快速傅里叶变换,使用scipy.fftpack.fft():
>>> from scipy import fftpack
>>> sample_freq = fftpack.fftfreq(sig.size, d=time_step)
>>> sig_fft = fftpack.fft(sig)
>>> sig_fft
array([ -2.15395509 +0.00000000e+00j, -6.84339997 +3.72950387e-01j,
-1.35865175 +2.23642454e+00j, -14.22631157 +1.40328658e+01j,
-1.41924893 -4.98010803e+02j, -3.81579545 +1.78527435e+01j,
3.02203464 -1.37534067e+01j, -12.48741665 -9.35088951e+00j,
-5.29439657 -2.84245298e+00j, 17.15426594 -1.66581323e-02j,
9.95052908 +9.31427197e+00j, 5.98106833 -5.42015882e+00j,
8.19048556 +8.81449084e+00j, -19.97601778 +1.77650459e+01j,
-14.33051218 +7.96662353e+00j, -11.11711153 +9.00672680e+00j,
-0.97972716 -5.83870961e+00j, -8.34503927 +2.83642270e+00j,
-27.29102845 -5.18345072e+00j, -3.92038028 +2.93027748e+00j,
-20.35766472 -1.77115265e+01j, -18.18424132 -8.89215838e+00j,
-1.93591302 -6.81772531e+00j, 2.07013917 -2.47164868e+00j,
-10.57760888 -6.66335300e+00j, 12.53425237 +7.20152587e+00j,
-18.62549910 -4.63085334e+00j, -10.68073483 +4.83099355e+00j,
-6.63167813 -9.02120461e+00j, 7.17224579 -1.49502551e+00j,
-1.26911958 +2.36113726e+01j, 4.42381960 +1.38600407e+01j,
16.34265089 +1.73518718e+00j, 8.30585259 -3.40695090e+00j,
20.63197209 -1.04995824e+01j, -0.85835968 +5.19893971e+00j,
-3.34180041 -8.26505111e-01j, -17.77990626 -7.75607121e+00j,
8.81357518 +9.64433869e+00j, -5.87143614 -1.18266090e+01j,
32.24238221 +5.57547662e+00j, -12.87864403 -4.87054691e+00j,
17.84469300 +1.48124772e+00j, 0.98895437 -1.73509646e+01j,
9.17529075 +4.19436604e+00j, 15.49493435 -1.35103238e+00j,
-5.60651149 -9.74808530e+00j, 8.19113247 +1.45283653e+01j,
-2.54008261 -1.92598459e+01j, 14.24697873 -8.14464536e+00j,
3.36492721 -7.98976393e+00j, 9.32464975 -7.28098566e-01j,
15.71422456 -7.48998739e+00j, 5.13840297 -5.53326826e+00j,
18.93804440 +3.44990274e+00j, -9.88021679 +9.88978646e+00j,
15.72094430 -1.74336858e+01j, 9.64742719 -4.06928418e+00j,
-2.77229909 +2.65764710e+00j, 17.95480670 +7.08575108e-01j,
-14.66290261 -4.27838327e+00j, -17.76819393 +1.57704148e+00j,
-11.95068650 +2.50702822e+01j, 3.45058499 -9.45392579e+00j,
8.80037448 -9.09984010e-01j, -2.14299713 +1.87982717e+01j,
14.85505773 -3.74696613e+00j, -10.81927864 +2.38331421e+00j,
15.24450891 +3.29444574e+00j, 11.59059296 +1.27590241e+01j,
-2.53856737 +1.04138895e+01j, -4.57380298 -5.31640857e-01j,
-1.43247318 +1.23658590e+00j, -10.22408704 +7.53333610e+00j,
-8.51838961 +7.57773439e+00j, -13.47652545 +4.56139815e+00j,
-13.42460404 -8.05574615e-01j, -4.42054209 +1.98925835e+01j,
1.48481138 -6.82391210e+00j, -1.45474552 -1.54220167e+01j,
-5.42306064 -9.27021008e+00j, 17.58160580 -4.10860999e+00j,
4.32988759 +1.38839278e+00j, 11.67640153 -3.28776107e+00j,
-0.39428169 -1.13438538e+01j, 0.50515517 +1.43795885e+01j,
18.66733138 +1.20931219e+01j, -3.72800953 -1.00824348e+01j,
9.97773909 +1.12743939e+01j, 5.26387189 -5.87977505e+00j,
-7.54205380 +3.21887194e+00j, -24.29452647 +5.24676682e+00j,
-1.46803834 +1.60060763e+01j, 0.58507188 -6.98480969e+00j,
-12.43390627 -2.10406611e+01j, -10.66025119 -4.37643147e+00j,
13.48961390 -1.68130269e+01j, 5.21885389 -2.41996035e+00j,
-14.63687090 -2.46882484e+00j, 18.15508153 +3.47809813e+00j,
-9.62034449 +6.48986336e+00j, 5.38999278 -2.06692234e+01j,
10.16949218 -7.41068976e+00j, -6.10597712 -1.12132247e+01j,
-5.23001175 -4.86218848e+00j, 7.23731581 +7.88490844e+00j,
-14.82657456 +1.81087852e+01j, 5.05015536 -1.20140817e+01j,
-14.16411928 -1.11772666e+01j, -14.00180896 -6.64176783e+00j,
8.23052856 +2.54591453e+00j, -18.58455280 -5.98191840e+00j,
-3.83352416 +4.92306879e+00j, 2.21684068 -9.01542096e+00j,
8.43654505 +7.86613546e+00j, -11.13045038 +2.48688138e+00j,
-2.28406636 +7.44377053e+00j, -6.59822489 +1.30026237e+01j,
18.68003857 +1.85842469e+01j, 11.24463737 -3.32583041e+00j,
9.72167858 -8.14339334e+00j, -16.96231588 +6.17116591e+00j,
6.40320631 -2.20743697e+01j, 2.96719150 -4.95797507e+00j,
-16.30578509 -2.43513712e+01j, -8.79383312 -5.19394976e-01j,
6.25116057 +9.17174794e+00j, 1.12691253 -6.80597104e+00j,
7.41124082 +2.24803535e+00j, 5.40348086 +1.58510877e+01j,
2.94022925 -2.00963668e+00j, -11.50148496 +1.18866527e+01j,
-8.65550297 -1.03518748e+01j, 2.82388621 -3.41605890e+00j,
-16.31843117 +1.75024091e+01j, 0.81786074 +5.80950153e-01j,
-4.67565418 -1.24443764e+01j, 5.78487485 +4.90420380e+00j,
15.76073504 +1.57621603e+01j, -7.12279807 +9.43785344e+00j,
2.89973393 -2.00692936e+01j, -5.80868719 +7.56967998e+00j,
17.73211360 -5.96996643e+00j, -11.00927950 -2.84364116e+00j,
13.53447489 +1.99061406e+01j, 12.96528914 +2.07968866e+01j,
2.32826255 -9.88927630e+00j, 3.43903942 +1.70740224e+01j,
4.34612664 -1.95042341e+01j, 13.26581889 +1.53878646e+01j,
-1.76587122 -1.45345167e+01j, -18.27550925 -1.65741419e+01j,
18.90008727 +1.32614253e+01j, -12.75275881 -3.73301232e+00j,
-10.54995201 +6.47387080e+00j, 4.40244688 +2.91973148e+00j,
-21.67557159 +2.72866146e+00j, -4.28005122 +1.27004754e+00j,
0.44143162 +2.67209641e-01j, -1.03023019 -9.82669036e+00j,
16.40259241 -6.84971647e+00j, 2.29632268 +8.92542003e+00j,
5.93231437 -1.55787248e+01j, 20.09593112 +9.89609586e+00j,
6.54844924 -4.12601073e+00j, 12.03831236 +1.25609582e+01j,
-17.22554496 -6.78265694e+00j, 9.19587911 -7.24983089e+00j,
1.99945478 -1.19714870e+01j, 6.11014729 +5.98816899e+00j,
4.27151073 +4.47080035e-01j, -4.99777636 -1.48866910e+00j,
7.25278959 +1.98939863e+01j, 13.15313214 -2.10943215e+01j,
5.64182479 -7.91306419e+00j, -21.83005572 +5.32789225e+00j,
5.01906654 -1.12559932e+01j, 8.51498836 +6.71427457e-01j,
-4.21680539 +1.53022745e+01j, -12.42920876 +9.14540424e+00j,
0.43547152 +1.44598540e+01j, -10.13168483 -1.45848902e-01j,
-13.26884993 +4.94117798e+00j, -0.10215771 -9.79285164e+00j,
4.85986418 +1.27122582e+01j, 9.43249467 +2.45656102e+01j,
-15.46190461 -4.74866125e+00j, -5.22758031 -1.21907516e+01j,
-18.20054881 -1.83389775e+01j, 4.44245126 +1.03709618e+01j,
8.87163172 +3.76802674e+00j, 12.72239638 -9.70588979e+00j,
2.57503130 +1.17534680e+01j, -7.36716272 -2.84806108e+00j,
0.05663573 -1.61814240e+01j, -19.51989191 -2.81862406e+01j,
8.25931199 +1.60490672e+01j, -4.87224457 -4.19360923e-01j,
-6.76747119 -2.96005072e+01j, -0.61411654 -1.14940287e+01j,
7.02770682 +5.72101758e-01j, -14.18615705 -1.12620340e+01j,
13.30557094 -7.48378448e+00j, 6.35780140 -1.93638611e+01j,
-1.37303098 +1.90450804e+01j, 18.33849311 -1.27395368e+01j,
-22.90892874 -8.21146112e-01j, -0.20821572 +6.99301314e+00j,
-9.38912186 -1.09687120e+01j, -6.49808354 +1.02551622e+01j,
-14.57805132 +7.67491289e+00j, -16.87183157 +8.47005412e-01j,
-15.54922223 +1.95311877e+00j, 30.58477464 -2.26230465e+01j,
11.50570045 +2.08719120e+01j, -3.96151348 +1.41282189e+01j,
13.16936108 -1.29916895e+00j, 9.87264569 +3.14428725e+00j,
-10.43113582 -9.49576005e+00j, 9.44631632 -1.74551322e+01j,
1.05236191 +1.38842936e+00j, -15.91935013 -4.98979129e+00j,
9.75261390 -1.57630518e+01j, 9.15095526 -3.32293304e+00j,
-7.17093546 +3.36508270e+00j, 8.27359688 -2.85757007e+00j,
-23.62546508 -2.06228484e+01j, -0.91048195 +3.84754785e+00j,
-0.21668100 +3.87662882e+00j, 8.12904863 +3.26765913e+01j,
17.06869164 -1.98970355e-01j, -5.51323781 -1.67590309e+01j,
-2.32135525 -7.35433813e+00j, 14.73830649 +8.49805979e-01j,
-6.67670303 -8.26416464e+00j, 6.45454747 -6.92988181e+00j,
-3.06822404 +2.64610305e+00j, 5.89154704 +1.70997249e+01j,
-4.16210290 -5.75542919e+00j, -16.94684139 +2.99672112e-01j,
-24.74660576 -5.70385968e+00j, 4.85144926 +1.18297703e+01j,
1.46038150 -4.17381464e-01j, -2.63136596 +4.04907109e+00j,
10.07620396 +1.74281239e+01j, -3.91870318 -4.29327758e+00j,
1.44857999 -1.48953094e+01j, 7.89963052 +2.74076332e+01j,
-1.18602368 +1.83942155e+01j, 12.18441706 -2.80913542e+00j,
-11.05942843 -1.44302731e+01j, -13.36859024 -3.67552772e+00j,
-6.68714131 -1.67517484e+00j, -5.26871633 +7.01063371e+00j,
11.79254879 +5.12667893e+00j, -10.76587622 -1.93434255e+00j,
-5.39914675 +1.22567796e+01j, -9.64213400 -1.29942666e+01j,
-14.61883886 -1.99996862e+00j, 1.73170965 -1.98074457e+01j,
-10.07526455 +1.88325932e+01j, -27.70524106 -5.01831574e+00j,
-3.57677426 -1.17565932e+01j, 15.72508354 +3.29319849e+00j,
-8.73150630 +1.93688065e+01j, -27.17001498 -6.22381237e+00j,
29.10265218 +4.49344669e+00j, -4.72421528 +5.57946372e+00j,
7.51238920 +4.07750101e+00j, -18.02684442 -1.40188101e+01j,
-14.42803323 -1.40922341e+01j, 15.87535270 -1.63592610e+01j,
13.80904817 -1.61561317e+01j, 0.64381824 +1.17991090e+00j,
4.89114469 -1.01457773e+01j, -12.83081285 -6.67897095e+00j,
-9.02728538 -1.12482922e+01j, 17.51865186 -7.35806992e+00j,
-6.30247317 +1.18597926e-01j, 12.56268173 -1.15521011e+01j,
-3.81240117 -9.81374544e+00j, 4.99246446 -1.70919158e+01j,
-5.62644920 -8.43180963e+00j, -9.80770371 -1.19226773e+01j,
-6.05232131 -2.27569917e+00j, -20.56660506 -7.38553669e+00j,
-1.52782951 -2.51740631e+00j, 6.71860611 +1.72411971e+01j,
-8.07213545 +4.46623045e+00j, -8.28406311 +9.69879505e+00j,
2.32230324 +5.84017433e+00j, 10.19211500 +1.54578585e+01j,
5.98938061 -1.18271786e+01j, 10.90328612 +3.49643875e+00j,
-1.15335131 -1.65104935e+01j, 6.59810546 +3.00470080e+00j,
-9.15710707 +4.66533034e+00j, -3.21962215 +3.42262429e+00j,
3.70572345 +3.04714306e-01j, -5.88234193 +5.56417731e-02j,
0.72541845 +8.02141499e+00j, -2.23232058 +8.43872750e+00j,
15.17511090 -6.95757019e-01j, 6.51812993 -1.10878071e+01j,
-4.53028194 -9.65708290e+00j, 16.89288146 -7.37657487e-01j,
-11.16266000 -3.64450358e+00j, -11.33130577 -1.15897278e+00j,
-11.55024808 -1.19316072e+00j, 2.22115657 -2.55595949e+01j,
-0.24278997 +1.48926641e+00j, 9.02975731 +4.39297659e+00j,
7.49234992 +4.84148532e+00j, 4.91172465 -5.45669898e+00j,
-2.52595648 -2.28065954e+00j, -0.50091490 +7.42036187e+00j,
1.37160725 -4.82552932e+00j, 9.73595726 -2.54950067e+01j,
3.26781015 +2.46716279e+00j, -22.11544868 -1.31458743e+01j,
6.32357993 -9.86900829e+00j, 18.80806503 +1.72494994e+01j,
2.21556531 -1.31071697e+01j, 15.81710316 -1.30471697e+01j,
13.13644659 +2.47322225e+01j, -15.04856927 -1.92668963e+00j,
17.42425034 -4.88045070e+00j, 1.32110249 -3.88475191e+00j,
0.55363109 +7.33529047e+00j, -9.03303129 -5.56931970e+00j,
-1.98661741 -2.93254036e-01j, -5.12900306 +1.04610462e+01j,
-15.69124501 +2.69748270e+00j, 2.52524212 -8.75628803e+00j,
11.69374122 -1.30088428e+01j, -11.55978389 +3.97524935e+00j,
-4.20527141 +1.00840134e+01j, -0.35314551 +1.09230520e+01j,
-5.02164128 +3.73789995e+00j, -15.08806273 -1.86011749e+01j,
0.36848888 +1.51684108e+01j, 20.61529873 -3.96731524e+00j,
-10.36646376 +2.73598394e+00j, -12.31043369 +1.47224459e+00j,
-10.14106981 -2.17994835e+00j, 2.01738395 +2.71095961e+01j,
17.82466496 +2.42801519e+00j, 17.26194343 -2.00160003e+01j,
-24.07958339 +3.04131691e+01j, -1.62522064 -3.62046534e+00j,
-2.80603505 -4.22111108e+00j, -6.99895067 -2.01822478e+01j,
-5.70135074 +1.08146032e+01j, 19.84530762 -3.78141355e+00j,
8.72032729 +1.02005249e+01j, 1.71395720 +9.62000396e-01j,
12.87926729 +6.02522132e+00j, -13.64932233 +7.08282069e+00j,
-17.09667789 +3.38911366e+00j, -1.60851249 -8.78833527e+00j,
11.58280666 +6.44323330e+00j, 1.68301629 -3.39499164e+00j,
-14.96472119 -3.25158565e-01j, -1.86770640 +6.25150532e+00j,
6.41580657 +4.54895485e+00j, -12.93090166 -1.20155571e+01j,
-25.21140940 -1.01804645e+01j, -1.30336016 -1.54806162e+01j,
14.10159674 -1.56811100e+00j, 16.86074472 +2.35175805e+01j,
-8.63454935 -5.94404062e+00j, 20.72291060 -1.15827055e+01j,
-2.74310595 +9.50677119e+00j, -11.11872082 +1.37772664e+01j,
-3.01621263 -8.68781271e+00j, -7.19538361 +1.70947955e+00j,
-1.05956181 -3.66566090e+00j, 9.41358433 +6.50899310e+00j,
-3.98848935 -8.04562034e+00j, 0.92534880 +1.02378236e+01j,
2.49361523 +1.71355226e+01j, 6.72948091 -2.16696124e+01j,
10.72614552 -6.90791494e+00j, -4.24005885 +1.86391110e+01j,
18.53748452 -1.17917923e+01j, 17.11073043 +1.09039263e+01j,
-1.60800693 +9.42099621e+00j, -1.58386417 +4.76152252e+00j,
-6.25374295 -2.91227690e+00j, -5.23685295 -1.71960433e+01j,
-1.45097955 +4.54782657e+00j, 0.86592496 +1.00316339e+00j,
-10.28621864 +3.94431941e+00j, -7.53229522 -5.38256020e+00j,
17.40600693 -1.28882907e+01j, 5.36884032 +3.50337236e+00j,
-3.96369909 -4.60918440e+00j, -6.33558281 -1.34175006e+01j,
1.59323342 -1.36937342e+00j, 20.63115616 -1.53814187e+00j,
3.67949228 -7.21449996e+00j, 2.34162923 -5.72912774e+00j,
-22.16528421 -5.36422197e+00j, 5.34952235 -8.14125056e-01j,
12.10124766 -2.53064962e+00j, -1.86240700 +9.43800079e+00j,
-0.88106797 -1.99678804e+01j, -14.88373779 -1.85377778e+01j,
-2.54824342 +3.71272409e-02j, 2.18032827 -3.58250591e+00j,
-5.86671188 -1.39147969e+01j, 13.52269912 -1.73238633e+01j,
-11.37732044 +1.64154001e+01j, 1.52422407 -6.15702559e+00j,
-3.44616906 -2.79793103e+00j, 12.23093443 -2.06389065e-01j,
-2.82028686 -5.95255934e-01j, 13.51451321 +1.01924580e+01j,
12.81556276 +9.72043893e+00j, -2.66661053 -2.01281467e+01j,
2.21993259 +1.79748907e+01j, -7.36602192 -1.47913985e+01j,
8.92270023 -1.12933738e+00j, 7.86046878 -1.13901810e+01j,
-24.92439930 +9.52264491e+00j, 12.64490053 +2.96035625e+00j,
7.56325160 +1.18396945e+01j, 3.66519246 +1.20816786e+01j,
-0.15569364 -5.50706861e+00j, 7.39800029 -1.56322599e+01j,
-1.31943550 -6.00836120e+00j, 11.07278884 +4.85167821e+00j,
8.45929476 +1.07602969e+01j, -14.33175112 -4.94764437e+00j,
-3.71777349 -7.55521799e+00j, 4.47832839 +2.50374324e+01j,
4.50320768 +2.04410643e+01j, 3.21352661 -8.02793030e+00j,
3.36182590 -1.83925802e+01j, 4.04422911 -1.89788806e+00j,
5.46200410 -1.02804317e+01j, 8.37859083 -1.49679252e+01j,
7.22370593 -1.51161842e+01j, 5.79768494 +1.40501716e+01j,
-13.86129491 +7.25669759e+00j, -13.62009637 -6.22137093e+00j,
0.38021765 +5.16606883e+00j, 6.11118836 +1.12573773e+01j,
-2.74813461 +1.98438605e+00j, -19.59129396 -9.88831984e+00j,
-7.69347631 -1.44004831e+01j, -6.88455949 +1.46572737e+00j,
13.96600202 -1.68031557e+01j, -8.19471797 +1.18679051e+01j,
3.24110071 -6.41859949e+00j, -16.58615781 +6.35747974e+00j,
-3.67270307 -5.04395309e+00j, 0.50993736 -4.06544366e+00j,
-18.77088004 +4.70380420e+00j, -1.93833343 +2.25169098e+01j,
10.58813667 -4.78540154e+00j, 13.80955977 +1.40383426e+01j,
7.14202107 +3.85572226e-01j, 8.30957568 -1.41239015e+01j,
5.20715833 +1.51185120e+01j, -14.78724074 -2.22984048e+01j,
-5.86458347 +2.08785425e+01j, 10.19993018 +1.64834426e+01j,
-20.90090065 -3.21139062e+00j, -3.48244116 +1.08494455e+01j,
-9.96622470 -5.95878809e+00j, -5.90396303 -2.75830509e+00j,
-15.20497478 -2.96493599e+00j, -10.15293621 +2.91893204e-01j,
-5.52852042 +6.97581853e+00j, 7.72625027 -1.84097183e+01j,
-0.85776714 +5.02141175e+00j, 3.55590102 -6.04083111e+00j,
-15.15583959 +9.09720126e+00j, -9.82936261 -1.33391883e+01j,
-6.94296454 +1.07669120e+01j, 1.91937459 +1.73719062e+01j,
4.55780981 -1.27936311e+00j, 0.27942443 -1.31020808e+01j,
-2.26962231 +6.92443569e-01j, -10.50481151 -2.52569274e+00j,
-0.24035389 +1.46242946e+00j, -13.21345669 -1.50256498e+01j,
6.72626094 +1.73873509e+01j, 16.65053773 -6.18592991e+00j,
-11.52238811 +1.24702695e+01j, 7.61105199 -5.94207333e+00j,
-13.78529301 +2.05108311e+01j, -3.40638412 -8.74646540e+00j,
7.59539858 -7.54307318e+00j, -6.35213283 -3.75734276e-01j,
12.08310636 +5.80852741e+00j, 14.18983746 +1.26173825e+01j,
7.53868943 +2.33674100e+00j, 6.72321091 +5.96509645e+00j,
-5.82215751 +0.00000000e+00j, 6.72321091 -5.96509645e+00j,
7.53868943 -2.33674100e+00j, 14.18983746 -1.26173825e+01j,
12.08310636 -5.80852741e+00j, -6.35213283 +3.75734276e-01j,
7.59539858 +7.54307318e+00j, -3.40638412 +8.74646540e+00j,
-13.78529301 -2.05108311e+01j, 7.61105199 +5.94207333e+00j,
-11.52238811 -1.24702695e+01j, 16.65053773 +6.18592991e+00j,
6.72626094 -1.73873509e+01j, -13.21345669 +1.50256498e+01j,
-0.24035389 -1.46242946e+00j, -10.50481151 +2.52569274e+00j,
-2.26962231 -6.92443569e-01j, 0.27942443 +1.31020808e+01j,
4.55780981 +1.27936311e+00j, 1.91937459 -1.73719062e+01j,
-6.94296454 -1.07669120e+01j, -9.82936261 +1.33391883e+01j,
-15.15583959 -9.09720126e+00j, 3.55590102 +6.04083111e+00j,
-0.85776714 -5.02141175e+00j, 7.72625027 +1.84097183e+01j,
-5.52852042 -6.97581853e+00j, -10.15293621 -2.91893204e-01j,
-15.20497478 +2.96493599e+00j, -5.90396303 +2.75830509e+00j,
-9.96622470 +5.95878809e+00j, -3.48244116 -1.08494455e+01j,
-20.90090065 +3.21139062e+00j, 10.19993018 -1.64834426e+01j,
-5.86458347 -2.08785425e+01j, -14.78724074 +2.22984048e+01j,
5.20715833 -1.51185120e+01j, 8.30957568 +1.41239015e+01j,
7.14202107 -3.85572226e-01j, 13.80955977 -1.40383426e+01j,
10.58813667 +4.78540154e+00j, -1.93833343 -2.25169098e+01j,
-18.77088004 -4.70380420e+00j, 0.50993736 +4.06544366e+00j,
-3.67270307 +5.04395309e+00j, -16.58615781 -6.35747974e+00j,
3.24110071 +6.41859949e+00j, -8.19471797 -1.18679051e+01j,
13.96600202 +1.68031557e+01j, -6.88455949 -1.46572737e+00j,
-7.69347631 +1.44004831e+01j, -19.59129396 +9.88831984e+00j,
-2.74813461 -1.98438605e+00j, 6.11118836 -1.12573773e+01j,
0.38021765 -5.16606883e+00j, -13.62009637 +6.22137093e+00j,
-13.86129491 -7.25669759e+00j, 5.79768494 -1.40501716e+01j,
7.22370593 +1.51161842e+01j, 8.37859083 +1.49679252e+01j,
5.46200410 +1.02804317e+01j, 4.04422911 +1.89788806e+00j,
3.36182590 +1.83925802e+01j, 3.21352661 +8.02793030e+00j,
4.50320768 -2.04410643e+01j, 4.47832839 -2.50374324e+01j,
-3.71777349 +7.55521799e+00j, -14.33175112 +4.94764437e+00j,
8.45929476 -1.07602969e+01j, 11.07278884 -4.85167821e+00j,
-1.31943550 +6.00836120e+00j, 7.39800029 +1.56322599e+01j,
-0.15569364 +5.50706861e+00j, 3.66519246 -1.20816786e+01j,
7.56325160 -1.18396945e+01j, 12.64490053 -2.96035625e+00j,
-24.92439930 -9.52264491e+00j, 7.86046878 +1.13901810e+01j,
8.92270023 +1.12933738e+00j, -7.36602192 +1.47913985e+01j,
2.21993259 -1.79748907e+01j, -2.66661053 +2.01281467e+01j,
12.81556276 -9.72043893e+00j, 13.51451321 -1.01924580e+01j,
-2.82028686 +5.95255934e-01j, 12.23093443 +2.06389065e-01j,
-3.44616906 +2.79793103e+00j, 1.52422407 +6.15702559e+00j,
-11.37732044 -1.64154001e+01j, 13.52269912 +1.73238633e+01j,
-5.86671188 +1.39147969e+01j, 2.18032827 +3.58250591e+00j,
-2.54824342 -3.71272409e-02j, -14.88373779 +1.85377778e+01j,
-0.88106797 +1.99678804e+01j, -1.86240700 -9.43800079e+00j,
12.10124766 +2.53064962e+00j, 5.34952235 +8.14125056e-01j,
-22.16528421 +5.36422197e+00j, 2.34162923 +5.72912774e+00j,
3.67949228 +7.21449996e+00j, 20.63115616 +1.53814187e+00j,
1.59323342 +1.36937342e+00j, -6.33558281 +1.34175006e+01j,
-3.96369909 +4.60918440e+00j, 5.36884032 -3.50337236e+00j,
17.40600693 +1.28882907e+01j, -7.53229522 +5.38256020e+00j,
-10.28621864 -3.94431941e+00j, 0.86592496 -1.00316339e+00j,
-1.45097955 -4.54782657e+00j, -5.23685295 +1.71960433e+01j,
-6.25374295 +2.91227690e+00j, -1.58386417 -4.76152252e+00j,
-1.60800693 -9.42099621e+00j, 17.11073043 -1.09039263e+01j,
18.53748452 +1.17917923e+01j, -4.24005885 -1.86391110e+01j,
10.72614552 +6.90791494e+00j, 6.72948091 +2.16696124e+01j,
2.49361523 -1.71355226e+01j, 0.92534880 -1.02378236e+01j,
-3.98848935 +8.04562034e+00j, 9.41358433 -6.50899310e+00j,
-1.05956181 +3.66566090e+00j, -7.19538361 -1.70947955e+00j,
-3.01621263 +8.68781271e+00j, -11.11872082 -1.37772664e+01j,
-2.74310595 -9.50677119e+00j, 20.72291060 +1.15827055e+01j,
-8.63454935 +5.94404062e+00j, 16.86074472 -2.35175805e+01j,
14.10159674 +1.56811100e+00j, -1.30336016 +1.54806162e+01j,
-25.21140940 +1.01804645e+01j, -12.93090166 +1.20155571e+01j,
6.41580657 -4.54895485e+00j, -1.86770640 -6.25150532e+00j,
-14.96472119 +3.25158565e-01j, 1.68301629 +3.39499164e+00j,
11.58280666 -6.44323330e+00j, -1.60851249 +8.78833527e+00j,
-17.09667789 -3.38911366e+00j, -13.64932233 -7.08282069e+00j,
12.87926729 -6.02522132e+00j, 1.71395720 -9.62000396e-01j,
8.72032729 -1.02005249e+01j, 19.84530762 +3.78141355e+00j,
-5.70135074 -1.08146032e+01j, -6.99895067 +2.01822478e+01j,
-2.80603505 +4.22111108e+00j, -1.62522064 +3.62046534e+00j,
-24.07958339 -3.04131691e+01j, 17.26194343 +2.00160003e+01j,
17.82466496 -2.42801519e+00j, 2.01738395 -2.71095961e+01j,
-10.14106981 +2.17994835e+00j, -12.31043369 -1.47224459e+00j,
-10.36646376 -2.73598394e+00j, 20.61529873 +3.96731524e+00j,
0.36848888 -1.51684108e+01j, -15.08806273 +1.86011749e+01j,
-5.02164128 -3.73789995e+00j, -0.35314551 -1.09230520e+01j,
-4.20527141 -1.00840134e+01j, -11.55978389 -3.97524935e+00j,
11.69374122 +1.30088428e+01j, 2.52524212 +8.75628803e+00j,
-15.69124501 -2.69748270e+00j, -5.12900306 -1.04610462e+01j,
-1.98661741 +2.93254036e-01j, -9.03303129 +5.56931970e+00j,
0.55363109 -7.33529047e+00j, 1.32110249 +3.88475191e+00j,
17.42425034 +4.88045070e+00j, -15.04856927 +1.92668963e+00j,
13.13644659 -2.47322225e+01j, 15.81710316 +1.30471697e+01j,
2.21556531 +1.31071697e+01j, 18.80806503 -1.72494994e+01j,
6.32357993 +9.86900829e+00j, -22.11544868 +1.31458743e+01j,
3.26781015 -2.46716279e+00j, 9.73595726 +2.54950067e+01j,
1.37160725 +4.82552932e+00j, -0.50091490 -7.42036187e+00j,
-2.52595648 +2.28065954e+00j, 4.91172465 +5.45669898e+00j,
7.49234992 -4.84148532e+00j, 9.02975731 -4.39297659e+00j,
-0.24278997 -1.48926641e+00j, 2.22115657 +2.55595949e+01j,
-11.55024808 +1.19316072e+00j, -11.33130577 +1.15897278e+00j,
-11.16266000 +3.64450358e+00j, 16.89288146 +7.37657487e-01j,
-4.53028194 +9.65708290e+00j, 6.51812993 +1.10878071e+01j,
15.17511090 +6.95757019e-01j, -2.23232058 -8.43872750e+00j,
0.72541845 -8.02141499e+00j, -5.88234193 -5.56417731e-02j,
3.70572345 -3.04714306e-01j, -3.21962215 -3.42262429e+00j,
-9.15710707 -4.66533034e+00j, 6.59810546 -3.00470080e+00j,
-1.15335131 +1.65104935e+01j, 10.90328612 -3.49643875e+00j,
5.98938061 +1.18271786e+01j, 10.19211500 -1.54578585e+01j,
2.32230324 -5.84017433e+00j, -8.28406311 -9.69879505e+00j,
-8.07213545 -4.46623045e+00j, 6.71860611 -1.72411971e+01j,
-1.52782951 +2.51740631e+00j, -20.56660506 +7.38553669e+00j,
-6.05232131 +2.27569917e+00j, -9.80770371 +1.19226773e+01j,
-5.62644920 +8.43180963e+00j, 4.99246446 +1.70919158e+01j,
-3.81240117 +9.81374544e+00j, 12.56268173 +1.15521011e+01j,
-6.30247317 -1.18597926e-01j, 17.51865186 +7.35806992e+00j,
-9.02728538 +1.12482922e+01j, -12.83081285 +6.67897095e+00j,
4.89114469 +1.01457773e+01j, 0.64381824 -1.17991090e+00j,
13.80904817 +1.61561317e+01j, 15.87535270 +1.63592610e+01j,
-14.42803323 +1.40922341e+01j, -18.02684442 +1.40188101e+01j,
7.51238920 -4.07750101e+00j, -4.72421528 -5.57946372e+00j,
29.10265218 -4.49344669e+00j, -27.17001498 +6.22381237e+00j,
-8.73150630 -1.93688065e+01j, 15.72508354 -3.29319849e+00j,
-3.57677426 +1.17565932e+01j, -27.70524106 +5.01831574e+00j,
-10.07526455 -1.88325932e+01j, 1.73170965 +1.98074457e+01j,
-14.61883886 +1.99996862e+00j, -9.64213400 +1.29942666e+01j,
-5.39914675 -1.22567796e+01j, -10.76587622 +1.93434255e+00j,
11.79254879 -5.12667893e+00j, -5.26871633 -7.01063371e+00j,
-6.68714131 +1.67517484e+00j, -13.36859024 +3.67552772e+00j,
-11.05942843 +1.44302731e+01j, 12.18441706 +2.80913542e+00j,
-1.18602368 -1.83942155e+01j, 7.89963052 -2.74076332e+01j,
1.44857999 +1.48953094e+01j, -3.91870318 +4.29327758e+00j,
10.07620396 -1.74281239e+01j, -2.63136596 -4.04907109e+00j,
1.46038150 +4.17381464e-01j, 4.85144926 -1.18297703e+01j,
-24.74660576 +5.70385968e+00j, -16.94684139 -2.99672112e-01j,
-4.16210290 +5.75542919e+00j, 5.89154704 -1.70997249e+01j,
-3.06822404 -2.64610305e+00j, 6.45454747 +6.92988181e+00j,
-6.67670303 +8.26416464e+00j, 14.73830649 -8.49805979e-01j,
-2.32135525 +7.35433813e+00j, -5.51323781 +1.67590309e+01j,
17.06869164 +1.98970355e-01j, 8.12904863 -3.26765913e+01j,
-0.21668100 -3.87662882e+00j, -0.91048195 -3.84754785e+00j,
-23.62546508 +2.06228484e+01j, 8.27359688 +2.85757007e+00j,
-7.17093546 -3.36508270e+00j, 9.15095526 +3.32293304e+00j,
9.75261390 +1.57630518e+01j, -15.91935013 +4.98979129e+00j,
1.05236191 -1.38842936e+00j, 9.44631632 +1.74551322e+01j,
-10.43113582 +9.49576005e+00j, 9.87264569 -3.14428725e+00j,
13.16936108 +1.29916895e+00j, -3.96151348 -1.41282189e+01j,
11.50570045 -2.08719120e+01j, 30.58477464 +2.26230465e+01j,
-15.54922223 -1.95311877e+00j, -16.87183157 -8.47005412e-01j,
-14.57805132 -7.67491289e+00j, -6.49808354 -1.02551622e+01j,
-9.38912186 +1.09687120e+01j, -0.20821572 -6.99301314e+00j,
-22.90892874 +8.21146112e-01j, 18.33849311 +1.27395368e+01j,
-1.37303098 -1.90450804e+01j, 6.35780140 +1.93638611e+01j,
13.30557094 +7.48378448e+00j, -14.18615705 +1.12620340e+01j,
7.02770682 -5.72101758e-01j, -0.61411654 +1.14940287e+01j,
-6.76747119 +2.96005072e+01j, -4.87224457 +4.19360923e-01j,
8.25931199 -1.60490672e+01j, -19.51989191 +2.81862406e+01j,
0.05663573 +1.61814240e+01j, -7.36716272 +2.84806108e+00j,
2.57503130 -1.17534680e+01j, 12.72239638 +9.70588979e+00j,
8.87163172 -3.76802674e+00j, 4.44245126 -1.03709618e+01j,
-18.20054881 +1.83389775e+01j, -5.22758031 +1.21907516e+01j,
-15.46190461 +4.74866125e+00j, 9.43249467 -2.45656102e+01j,
4.85986418 -1.27122582e+01j, -0.10215771 +9.79285164e+00j,
-13.26884993 -4.94117798e+00j, -10.13168483 +1.45848902e-01j,
0.43547152 -1.44598540e+01j, -12.42920876 -9.14540424e+00j,
-4.21680539 -1.53022745e+01j, 8.51498836 -6.71427457e-01j,
5.01906654 +1.12559932e+01j, -21.83005572 -5.32789225e+00j,
5.64182479 +7.91306419e+00j, 13.15313214 +2.10943215e+01j,
7.25278959 -1.98939863e+01j, -4.99777636 +1.48866910e+00j,
4.27151073 -4.47080035e-01j, 6.11014729 -5.98816899e+00j,
1.99945478 +1.19714870e+01j, 9.19587911 +7.24983089e+00j,
-17.22554496 +6.78265694e+00j, 12.03831236 -1.25609582e+01j,
6.54844924 +4.12601073e+00j, 20.09593112 -9.89609586e+00j,
5.93231437 +1.55787248e+01j, 2.29632268 -8.92542003e+00j,
16.40259241 +6.84971647e+00j, -1.03023019 +9.82669036e+00j,
0.44143162 -2.67209641e-01j, -4.28005122 -1.27004754e+00j,
-21.67557159 -2.72866146e+00j, 4.40244688 -2.91973148e+00j,
-10.54995201 -6.47387080e+00j, -12.75275881 +3.73301232e+00j,
18.90008727 -1.32614253e+01j, -18.27550925 +1.65741419e+01j,
-1.76587122 +1.45345167e+01j, 13.26581889 -1.53878646e+01j,
4.34612664 +1.95042341e+01j, 3.43903942 -1.70740224e+01j,
2.32826255 +9.88927630e+00j, 12.96528914 -2.07968866e+01j,
13.53447489 -1.99061406e+01j, -11.00927950 +2.84364116e+00j,
17.73211360 +5.96996643e+00j, -5.80868719 -7.56967998e+00j,
2.89973393 +2.00692936e+01j, -7.12279807 -9.43785344e+00j,
15.76073504 -1.57621603e+01j, 5.78487485 -4.90420380e+00j,
-4.67565418 +1.24443764e+01j, 0.81786074 -5.80950153e-01j,
-16.31843117 -1.75024091e+01j, 2.82388621 +3.41605890e+00j,
-8.65550297 +1.03518748e+01j, -11.50148496 -1.18866527e+01j,
2.94022925 +2.00963668e+00j, 5.40348086 -1.58510877e+01j,
7.41124082 -2.24803535e+00j, 1.12691253 +6.80597104e+00j,
6.25116057 -9.17174794e+00j, -8.79383312 +5.19394976e-01j,
-16.30578509 +2.43513712e+01j, 2.96719150 +4.95797507e+00j,
6.40320631 +2.20743697e+01j, -16.96231588 -6.17116591e+00j,
9.72167858 +8.14339334e+00j, 11.24463737 +3.32583041e+00j,
18.68003857 -1.85842469e+01j, -6.59822489 -1.30026237e+01j,
-2.28406636 -7.44377053e+00j, -11.13045038 -2.48688138e+00j,
8.43654505 -7.86613546e+00j, 2.21684068 +9.01542096e+00j,
-3.83352416 -4.92306879e+00j, -18.58455280 +5.98191840e+00j,
8.23052856 -2.54591453e+00j, -14.00180896 +6.64176783e+00j,
-14.16411928 +1.11772666e+01j, 5.05015536 +1.20140817e+01j,
-14.82657456 -1.81087852e+01j, 7.23731581 -7.88490844e+00j,
-5.23001175 +4.86218848e+00j, -6.10597712 +1.12132247e+01j,
10.16949218 +7.41068976e+00j, 5.38999278 +2.06692234e+01j,
-9.62034449 -6.48986336e+00j, 18.15508153 -3.47809813e+00j,
-14.63687090 +2.46882484e+00j, 5.21885389 +2.41996035e+00j,
13.48961390 +1.68130269e+01j, -10.66025119 +4.37643147e+00j,
-12.43390627 +2.10406611e+01j, 0.58507188 +6.98480969e+00j,
-1.46803834 -1.60060763e+01j, -24.29452647 -5.24676682e+00j,
-7.54205380 -3.21887194e+00j, 5.26387189 +5.87977505e+00j,
9.97773909 -1.12743939e+01j, -3.72800953 +1.00824348e+01j,
18.66733138 -1.20931219e+01j, 0.50515517 -1.43795885e+01j,
-0.39428169 +1.13438538e+01j, 11.67640153 +3.28776107e+00j,
4.32988759 -1.38839278e+00j, 17.58160580 +4.10860999e+00j,
-5.42306064 +9.27021008e+00j, -1.45474552 +1.54220167e+01j,
1.48481138 +6.82391210e+00j, -4.42054209 -1.98925835e+01j,
-13.42460404 +8.05574615e-01j, -13.47652545 -4.56139815e+00j,
-8.51838961 -7.57773439e+00j, -10.22408704 -7.53333610e+00j,
-1.43247318 -1.23658590e+00j, -4.57380298 +5.31640857e-01j,
-2.53856737 -1.04138895e+01j, 11.59059296 -1.27590241e+01j,
15.24450891 -3.29444574e+00j, -10.81927864 -2.38331421e+00j,
14.85505773 +3.74696613e+00j, -2.14299713 -1.87982717e+01j,
8.80037448 +9.09984010e-01j, 3.45058499 +9.45392579e+00j,
-11.95068650 -2.50702822e+01j, -17.76819393 -1.57704148e+00j,
-14.66290261 +4.27838327e+00j, 17.95480670 -7.08575108e-01j,
-2.77229909 -2.65764710e+00j, 9.64742719 +4.06928418e+00j,
15.72094430 +1.74336858e+01j, -9.88021679 -9.88978646e+00j,
18.93804440 -3.44990274e+00j, 5.13840297 +5.53326826e+00j,
15.71422456 +7.48998739e+00j, 9.32464975 +7.28098566e-01j,
3.36492721 +7.98976393e+00j, 14.24697873 +8.14464536e+00j,
-2.54008261 +1.92598459e+01j, 8.19113247 -1.45283653e+01j,
-5.60651149 +9.74808530e+00j, 15.49493435 +1.35103238e+00j,
9.17529075 -4.19436604e+00j, 0.98895437 +1.73509646e+01j,
17.84469300 -1.48124772e+00j, -12.87864403 +4.87054691e+00j,
32.24238221 -5.57547662e+00j, -5.87143614 +1.18266090e+01j,
8.81357518 -9.64433869e+00j, -17.77990626 +7.75607121e+00j,
-3.34180041 +8.26505111e-01j, -0.85835968 -5.19893971e+00j,
20.63197209 +1.04995824e+01j, 8.30585259 +3.40695090e+00j,
16.34265089 -1.73518718e+00j, 4.42381960 -1.38600407e+01j,
-1.26911958 -2.36113726e+01j, 7.17224579 +1.49502551e+00j,
-6.63167813 +9.02120461e+00j, -10.68073483 -4.83099355e+00j,
-18.62549910 +4.63085334e+00j, 12.53425237 -7.20152587e+00j,
-10.57760888 +6.66335300e+00j, 2.07013917 +2.47164868e+00j,
-1.93591302 +6.81772531e+00j, -18.18424132 +8.89215838e+00j,
-20.35766472 +1.77115265e+01j, -3.92038028 -2.93027748e+00j,
-27.29102845 +5.18345072e+00j, -8.34503927 -2.83642270e+00j,
-0.97972716 +5.83870961e+00j, -11.11711153 -9.00672680e+00j,
-14.33051218 -7.96662353e+00j, -19.97601778 -1.77650459e+01j,
8.19048556 -8.81449084e+00j, 5.98106833 +5.42015882e+00j,
9.95052908 -9.31427197e+00j, 17.15426594 +1.66581323e-02j,
-5.29439657 +2.84245298e+00j, -12.48741665 +9.35088951e+00j,
3.02203464 +1.37534067e+01j, -3.81579545 -1.78527435e+01j,
-1.41924893 +4.98010803e+02j, -14.22631157 -1.40328658e+01j,
-1.35865175 -2.23642454e+00j, -6.84339997 -3.72950387e-01j])
>>> sample_freq
array([ 0. , 0.05, 0.1 , 0.15, 0.2 , 0.25, 0.3 , 0.35,
0.4 , 0.45, 0.5 , 0.55, 0.6 , 0.65, 0.7 , 0.75,
0.8 , 0.85, 0.9 , 0.95, 1. , 1.05, 1.1 , 1.15,
1.2 , 1.25, 1.3 , 1.35, 1.4 , 1.45, 1.5 , 1.55,
1.6 , 1.65, 1.7 , 1.75, 1.8 , 1.85, 1.9 , 1.95,
2. , 2.05, 2.1 , 2.15, 2.2 , 2.25, 2.3 , 2.35,
2.4 , 2.45, 2.5 , 2.55, 2.6 , 2.65, 2.7 , 2.75,
2.8 , 2.85, 2.9 , 2.95, 3. , 3.05, 3.1 , 3.15,
3.2 , 3.25, 3.3 , 3.35, 3.4 , 3.45, 3.5 , 3.55,
3.6 , 3.65, 3.7 , 3.75, 3.8 , 3.85, 3.9 , 3.95,
4. , 4.05, 4.1 , 4.15, 4.2 , 4.25, 4.3 , 4.35,
4.4 , 4.45, 4.5 , 4.55, 4.6 , 4.65, 4.7 , 4.75,
4.8 , 4.85, 4.9 , 4.95, 5. , 5.05, 5.1 , 5.15,
5.2 , 5.25, 5.3 , 5.35, 5.4 , 5.45, 5.5 , 5.55,
5.6 , 5.65, 5.7 , 5.75, 5.8 , 5.85, 5.9 , 5.95,
6. , 6.05, 6.1 , 6.15, 6.2 , 6.25, 6.3 , 6.35,
6.4 , 6.45, 6.5 , 6.55, 6.6 , 6.65, 6.7 , 6.75,
6.8 , 6.85, 6.9 , 6.95, 7. , 7.05, 7.1 , 7.15,
7.2 , 7.25, 7.3 , 7.35, 7.4 , 7.45, 7.5 , 7.55,
7.6 , 7.65, 7.7 , 7.75, 7.8 , 7.85, 7.9 , 7.95,
8. , 8.05, 8.1 , 8.15, 8.2 , 8.25, 8.3 , 8.35,
8.4 , 8.45, 8.5 , 8.55, 8.6 , 8.65, 8.7 , 8.75,
8.8 , 8.85, 8.9 , 8.95, 9. , 9.05, 9.1 , 9.15,
9.2 , 9.25, 9.3 , 9.35, 9.4 , 9.45, 9.5 , 9.55,
9.6 , 9.65, 9.7 , 9.75, 9.8 , 9.85, 9.9 , 9.95,
10. , 10.05, 10.1 , 10.15, 10.2 , 10.25, 10.3 , 10.35,
10.4 , 10.45, 10.5 , 10.55, 10.6 , 10.65, 10.7 , 10.75,
10.8 , 10.85, 10.9 , 10.95, 11. , 11.05, 11.1 , 11.15,
11.2 , 11.25, 11.3 , 11.35, 11.4 , 11.45, 11.5 , 11.55,
11.6 , 11.65, 11.7 , 11.75, 11.8 , 11.85, 11.9 , 11.95,
12. , 12.05, 12.1 , 12.15, 12.2 , 12.25, 12.3 , 12.35,
12.4 , 12.45, 12.5 , 12.55, 12.6 , 12.65, 12.7 , 12.75,
12.8 , 12.85, 12.9 , 12.95, 13. , 13.05, 13.1 , 13.15,
13.2 , 13.25, 13.3 , 13.35, 13.4 , 13.45, 13.5 , 13.55,
13.6 , 13.65, 13.7 , 13.75, 13.8 , 13.85, 13.9 , 13.95,
14. , 14.05, 14.1 , 14.15, 14.2 , 14.25, 14.3 , 14.35,
14.4 , 14.45, 14.5 , 14.55, 14.6 , 14.65, 14.7 , 14.75,
14.8 , 14.85, 14.9 , 14.95, 15. , 15.05, 15.1 , 15.15,
15.2 , 15.25, 15.3 , 15.35, 15.4 , 15.45, 15.5 , 15.55,
15.6 , 15.65, 15.7 , 15.75, 15.8 , 15.85, 15.9 , 15.95,
16. , 16.05, 16.1 , 16.15, 16.2 , 16.25, 16.3 , 16.35,
16.4 , 16.45, 16.5 , 16.55, 16.6 , 16.65, 16.7 , 16.75,
16.8 , 16.85, 16.9 , 16.95, 17. , 17.05, 17.1 , 17.15,
17.2 , 17.25, 17.3 , 17.35, 17.4 , 17.45, 17.5 , 17.55,
17.6 , 17.65, 17.7 , 17.75, 17.8 , 17.85, 17.9 , 17.95,
18. , 18.05, 18.1 , 18.15, 18.2 , 18.25, 18.3 , 18.35,
18.4 , 18.45, 18.5 , 18.55, 18.6 , 18.65, 18.7 , 18.75,
18.8 , 18.85, 18.9 , 18.95, 19. , 19.05, 19.1 , 19.15,
19.2 , 19.25, 19.3 , 19.35, 19.4 , 19.45, 19.5 , 19.55,
19.6 , 19.65, 19.7 , 19.75, 19.8 , 19.85, 19.9 , 19.95,
20. , 20.05, 20.1 , 20.15, 20.2 , 20.25, 20.3 , 20.35,
20.4 , 20.45, 20.5 , 20.55, 20.6 , 20.65, 20.7 , 20.75,
20.8 , 20.85, 20.9 , 20.95, 21. , 21.05, 21.1 , 21.15,
21.2 , 21.25, 21.3 , 21.35, 21.4 , 21.45, 21.5 , 21.55,
21.6 , 21.65, 21.7 , 21.75, 21.8 , 21.85, 21.9 , 21.95,
22. , 22.05, 22.1 , 22.15, 22.2 , 22.25, 22.3 , 22.35,
22.4 , 22.45, 22.5 , 22.55, 22.6 , 22.65, 22.7 , 22.75,
22.8 , 22.85, 22.9 , 22.95, 23. , 23.05, 23.1 , 23.15,
23.2 , 23.25, 23.3 , 23.35, 23.4 , 23.45, 23.5 , 23.55,
23.6 , 23.65, 23.7 , 23.75, 23.8 , 23.85, 23.9 , 23.95,
24. , 24.05, 24.1 , 24.15, 24.2 , 24.25, 24.3 , 24.35,
24.4 , 24.45, 24.5 , 24.55, 24.6 , 24.65, 24.7 , 24.75,
24.8 , 24.85, 24.9 , 24.95, -25. , -24.95, -24.9 , -24.85,
-24.8 , -24.75, -24.7 , -24.65, -24.6 , -24.55, -24.5 , -24.45,
-24.4 , -24.35, -24.3 , -24.25, -24.2 , -24.15, -24.1 , -24.05,
-24. , -23.95, -23.9 , -23.85, -23.8 , -23.75, -23.7 , -23.65,
-23.6 , -23.55, -23.5 , -23.45, -23.4 , -23.35, -23.3 , -23.25,
-23.2 , -23.15, -23.1 , -23.05, -23. , -22.95, -22.9 , -22.85,
-22.8 , -22.75, -22.7 , -22.65, -22.6 , -22.55, -22.5 , -22.45,
-22.4 , -22.35, -22.3 , -22.25, -22.2 , -22.15, -22.1 , -22.05,
-22. , -21.95, -21.9 , -21.85, -21.8 , -21.75, -21.7 , -21.65,
-21.6 , -21.55, -21.5 , -21.45, -21.4 , -21.35, -21.3 , -21.25,
-21.2 , -21.15, -21.1 , -21.05, -21. , -20.95, -20.9 , -20.85,
-20.8 , -20.75, -20.7 , -20.65, -20.6 , -20.55, -20.5 , -20.45,
-20.4 , -20.35, -20.3 , -20.25, -20.2 , -20.15, -20.1 , -20.05,
-20. , -19.95, -19.9 , -19.85, -19.8 , -19.75, -19.7 , -19.65,
-19.6 , -19.55, -19.5 , -19.45, -19.4 , -19.35, -19.3 , -19.25,
-19.2 , -19.15, -19.1 , -19.05, -19. , -18.95, -18.9 , -18.85,
-18.8 , -18.75, -18.7 , -18.65, -18.6 , -18.55, -18.5 , -18.45,
-18.4 , -18.35, -18.3 , -18.25, -18.2 , -18.15, -18.1 , -18.05,
-18. , -17.95, -17.9 , -17.85, -17.8 , -17.75, -17.7 , -17.65,
-17.6 , -17.55, -17.5 , -17.45, -17.4 , -17.35, -17.3 , -17.25,
-17.2 , -17.15, -17.1 , -17.05, -17. , -16.95, -16.9 , -16.85,
-16.8 , -16.75, -16.7 , -16.65, -16.6 , -16.55, -16.5 , -16.45,
-16.4 , -16.35, -16.3 , -16.25, -16.2 , -16.15, -16.1 , -16.05,
-16. , -15.95, -15.9 , -15.85, -15.8 , -15.75, -15.7 , -15.65,
-15.6 , -15.55, -15.5 , -15.45, -15.4 , -15.35, -15.3 , -15.25,
-15.2 , -15.15, -15.1 , -15.05, -15. , -14.95, -14.9 , -14.85,
-14.8 , -14.75, -14.7 , -14.65, -14.6 , -14.55, -14.5 , -14.45,
-14.4 , -14.35, -14.3 , -14.25, -14.2 , -14.15, -14.1 , -14.05,
-14. , -13.95, -13.9 , -13.85, -13.8 , -13.75, -13.7 , -13.65,
-13.6 , -13.55, -13.5 , -13.45, -13.4 , -13.35, -13.3 , -13.25,
-13.2 , -13.15, -13.1 , -13.05, -13. , -12.95, -12.9 , -12.85,
-12.8 , -12.75, -12.7 , -12.65, -12.6 , -12.55, -12.5 , -12.45,
-12.4 , -12.35, -12.3 , -12.25, -12.2 , -12.15, -12.1 , -12.05,
-12. , -11.95, -11.9 , -11.85, -11.8 , -11.75, -11.7 , -11.65,
-11.6 , -11.55, -11.5 , -11.45, -11.4 , -11.35, -11.3 , -11.25,
-11.2 , -11.15, -11.1 , -11.05, -11. , -10.95, -10.9 , -10.85,
-10.8 , -10.75, -10.7 , -10.65, -10.6 , -10.55, -10.5 , -10.45,
-10.4 , -10.35, -10.3 , -10.25, -10.2 , -10.15, -10.1 , -10.05,
-10. , -9.95, -9.9 , -9.85, -9.8 , -9.75, -9.7 , -9.65,
-9.6 , -9.55, -9.5 , -9.45, -9.4 , -9.35, -9.3 , -9.25,
-9.2 , -9.15, -9.1 , -9.05, -9. , -8.95, -8.9 , -8.85,
-8.8 , -8.75, -8.7 , -8.65, -8.6 , -8.55, -8.5 , -8.45,
-8.4 , -8.35, -8.3 , -8.25, -8.2 , -8.15, -8.1 , -8.05,
-8. , -7.95, -7.9 , -7.85, -7.8 , -7.75, -7.7 , -7.65,
-7.6 , -7.55, -7.5 , -7.45, -7.4 , -7.35, -7.3 , -7.25,
-7.2 , -7.15, -7.1 , -7.05, -7. , -6.95, -6.9 , -6.85,
-6.8 , -6.75, -6.7 , -6.65, -6.6 , -6.55, -6.5 , -6.45,
-6.4 , -6.35, -6.3 , -6.25, -6.2 , -6.15, -6.1 , -6.05,
-6. , -5.95, -5.9 , -5.85, -5.8 , -5.75, -5.7 , -5.65,
-5.6 , -5.55, -5.5 , -5.45, -5.4 , -5.35, -5.3 , -5.25,
-5.2 , -5.15, -5.1 , -5.05, -5. , -4.95, -4.9 , -4.85,
-4.8 , -4.75, -4.7 , -4.65, -4.6 , -4.55, -4.5 , -4.45,
-4.4 , -4.35, -4.3 , -4.25, -4.2 , -4.15, -4.1 , -4.05,
-4. , -3.95, -3.9 , -3.85, -3.8 , -3.75, -3.7 , -3.65,
-3.6 , -3.55, -3.5 , -3.45, -3.4 , -3.35, -3.3 , -3.25,
-3.2 , -3.15, -3.1 , -3.05, -3. , -2.95, -2.9 , -2.85,
-2.8 , -2.75, -2.7 , -2.65, -2.6 , -2.55, -2.5 , -2.45,
-2.4 , -2.35, -2.3 , -2.25, -2.2 , -2.15, -2.1 , -2.05,
-2. , -1.95, -1.9 , -1.85, -1.8 , -1.75, -1.7 , -1.65,
-1.6 , -1.55, -1.5 , -1.45, -1.4 , -1.35, -1.3 , -1.25,
-1.2 , -1.15, -1.1 , -1.05, -1. , -0.95, -0.9 , -0.85,
-0.8 , -0.75, -0.7 , -0.65, -0.6 , -0.55, -0.5 , -0.45,
-0.4 , -0.35, -0.3 , -0.25, -0.2 , -0.15, -0.1 , -0.05])
Numpy中也有用于计算快速傅里叶变换的模块:numpy.fft
但是scipy.fftpack是我们的首选,因为应用了更多底层的工具,工作效率要高一些。
优化器:scipy.optimize
scipy.optimize通常用来最小化一个函数值
构建一个函数并绘制函数图:
>>> def f(x):
... return x**2+10*np.sin(x)
>>> x = np.arange(-10, 10, 0.1)
>>> import matplotlib.pyplot as plt
>>> plt.plot(x, f(x))
[<matplotlib.lines.Line2D object at 0x7fc8817a1dd0>]
>>> plt.show()
如果我们要找出这个函数的最小值,也就是曲线的最低点。就可以用到BFGS优化算法(Broyden–Fletcher–Goldfarb–Shanno algorithm):
>>> from scipy import optimize
>>> optimize.fmin_bfgs(f,0)
Optimization terminated successfully.
Current function value: -7.945823
Iterations: 5
Function evaluations: 18
Gradient evaluations: 6
array([-1.30644012])
可以得到最低点的值为-1.30644012,optimize.fmin_bfgs(f, 0)第二个参数0表示从0点的位置最小化,找到最低点(该点刚好为全局最低点)。假如我从3点的位置开始梯度下降,那么得到的将会是局部最低点 3.83746709:
>>> optimize.fmin_bfgs(f,3,disp=0)
array([ 3.83746709])
假如你无法选出the global minimum的邻近点作为初始点的话可以使用scipy.optimize.basinhopping(),具体就不展开描述。
统计工具:scipy.stats
首先我们随机生成1000个服从正态分布的数:
>>> from scipy import stats
>>> a = np.random.normal(size=1000)
>>> loc, std = stats.norm.fit(a)
>>> loc
0.023660388470055038
>>> std
0.98751169104611047
>>> np.median(a)
0.03376630034524767
>>> plt.plot(a)
[<matplotlib.lines.Line2D object at 0x7fc87bb79a50>]
>>> plt.show()
还有像scipy的其他模块(计算积分、信号处理、图像处理的模块)就不一一介绍了。其实机器学习最基础的部分还是属于一些统计算法和优化算法。
参考链接
请戳这里