SciPy

SciPy is a collection of mathematical algorithms and convenience functions built on the Numpy extension of Python. It adds significant power to the interactive Python session by providing the user with high-level commands and classes for manipulating and visualizing data. With SciPy an interactive Python session becomes a data-processing and system-prototyping environment rivaling systems such as MATLAB, IDL, Octave, R-Lab, and SciLab.

The additional benefit of basing SciPy on Python is that this also makes a powerful programming language available for use in developing sophisticated programs and specialized applications. Scientific applications using SciPy benefit from the development of additional modules in numerous niches of the software landscape by developers across the world.

Everything from parallel programming to web and data-base subroutines and classes have been made available to the Python programmer. All of this power is available in addition to the mathematical libraries in SciPy.

We'll focus a lot more on NumPy arrays, but let's show some of the capabilities of SciPy:


In [21]:
import numpy as np
A = np.array([[1,2,3],[4,5,6],[7,8,8]])

Linear Algebra

linalg


In [22]:
from scipy import linalg

Determinant of a Matrix


In [23]:
# Compute the determinant of a matrix
linalg.det(A)


Out[23]:
2.999999999999997

Compute pivoted LU decomposition of a matrix.

The decomposition is::

A = P L U

where P is a permutation matrix, L lower triangular with unit diagonal elements, and U upper triangular.


In [24]:
P, L, U = linalg.lu(A)

In [25]:
P


Out[25]:
array([[ 0.,  1.,  0.],
       [ 0.,  0.,  1.],
       [ 1.,  0.,  0.]])

In [26]:
L


Out[26]:
array([[ 1.        ,  0.        ,  0.        ],
       [ 0.14285714,  1.        ,  0.        ],
       [ 0.57142857,  0.5       ,  1.        ]])

In [27]:
U


Out[27]:
array([[ 7.        ,  8.        ,  8.        ],
       [ 0.        ,  0.85714286,  1.85714286],
       [ 0.        ,  0.        ,  0.5       ]])

In [28]:
np.dot(L,U)


Out[28]:
array([[ 7.,  8.,  8.],
       [ 1.,  2.,  3.],
       [ 4.,  5.,  6.]])

We can find out the eigenvalues and eigenvectors of this matrix:


In [30]:
EW, EV = linalg.eig(A)

In [31]:
EW


Out[31]:
array([ 15.55528261+0.j,  -1.41940876+0.j,  -0.13587385+0.j])

In [32]:
EV


Out[32]:
array([[-0.24043423, -0.67468642,  0.51853459],
       [-0.54694322, -0.23391616, -0.78895962],
       [-0.80190056,  0.70005819,  0.32964312]])

Solving systems of linear equations can also be done:


In [41]:
v = np.array([[2],[3],[5]])

In [42]:
v


Out[42]:
array([[2],
       [3],
       [5]])

In [43]:
s = linalg.solve(A,v)

In [44]:
s


Out[44]:
array([[-2.33333333],
       [ 3.66666667],
       [-1.        ]])

Sparse Linear Algebra

SciPy has some routines for computing with sparse and potentially very large matrices. The necessary tools are in the submodule scipy.sparse.

We make one example on how to construct a large matrix:


In [48]:
from scipy import sparse

In [49]:
# Row-based linked list sparse matrix
A = sparse.lil_matrix((1000, 1000))

In [50]:
A


Out[50]:
<1000x1000 sparse matrix of type '<class 'numpy.float64'>'
	with 0 stored elements in LInked List format>

In [51]:
A[0,:100] = np.random.rand(100)

In [52]:
A[1,100:200] = A[0,:100]

In [54]:
A.setdiag(np.random.rand(1000))

In [57]:
A


Out[57]:
<1000x1000 sparse matrix of type '<class 'numpy.float64'>'
	with 1199 stored elements in LInked List format>

Linear Algebra for Sparse Matrices


In [56]:
from scipy.sparse import linalg

In [64]:
# Convert this matrix to Compressed Sparse Row format.
A.tocsr()


Out[64]:
<1000x1000 sparse matrix of type '<class 'numpy.float64'>'
	with 1199 stored elements in Compressed Sparse Row format>

In [65]:
A = A.tocsr()

In [66]:
b = np.random.rand(1000)

In [67]:
linalg.spsolve(A, b)


Out[67]:
array([ -5.95139017e+01,  -2.11676791e+02,   8.71500295e-01,
         8.80692794e+00,   3.92509926e-01,   4.07735642e+00,
         1.03953304e+00,   8.67487093e-01,   1.04239180e+00,
         5.64067865e-01,   5.66852537e-01,   1.44603822e+01,
         3.08908787e-01,   3.84755428e+00,   2.59572317e-01,
         2.01455584e+00,   7.22529398e-01,   3.10774145e-01,
         5.99430111e-01,   9.94908214e-01,   8.16556218e-01,
         6.13388488e-01,   5.14511939e-01,   5.93379845e-01,
         7.16747945e+00,   1.12059905e+00,   2.57598133e+00,
         7.23065380e-01,   1.11316273e+00,   5.71046430e-01,
         6.07181161e-01,   1.88477643e+00,   2.30443811e+00,
         2.57915718e-01,   6.98913445e+00,   1.64715697e+00,
         4.05564022e-04,   4.70426767e+00,   1.72471960e+00,
         2.96000041e+00,   6.40251397e-01,   1.48918343e+00,
         8.51904053e-01,   1.02156309e-01,   1.46841021e+00,
         8.74947320e-01,   7.52231106e-01,   1.51041285e-01,
         7.01065652e-01,   6.27547877e-02,   1.70077118e+00,
         9.52613806e-01,   1.42793388e-01,   1.96810160e+00,
         6.17217022e-01,   7.49727082e-01,   5.33575097e-01,
         1.03863941e+00,   7.95971011e-01,   4.07624501e-01,
         9.92555378e-01,   2.56062399e+00,   8.64957711e-02,
         3.78215912e-01,   2.93218489e+00,   1.35306106e+01,
         3.60303628e-01,   1.85928272e+00,   5.91817421e-01,
         6.39544270e-01,   3.47595949e+00,   3.22209117e-01,
         1.04924603e+00,   1.12719687e+00,   1.55112764e-01,
         1.16219431e+00,   3.65473227e+00,   4.04119747e+01,
         4.85477473e-01,   1.03664719e+00,   2.00128063e+00,
         1.11899447e+00,   1.09863788e+00,   6.99312178e-02,
         1.27631136e-01,   7.01354698e-01,   1.28109561e+00,
         3.17288887e+01,   1.94713261e+00,   6.06807841e-01,
         2.16209114e+00,   3.16510515e-01,   3.46509075e-01,
         3.87765636e-02,   7.49454229e-01,   1.89014767e+00,
         9.56446406e-01,   1.39753660e+00,   1.64642641e-01,
         1.11291261e+01,   2.59032211e-01,   4.09694844e+00,
         3.50564965e-01,   1.46250570e+00,   9.09778475e-01,
         1.00302659e+00,   1.05869890e+00,   1.37089837e+00,
         1.46232392e+00,   2.26817086e+01,   2.54763517e+00,
         1.72015651e-02,   3.93255428e-01,   9.05958975e-01,
         6.44712395e-01,   3.32435819e-01,   6.50999863e-01,
         6.53226070e+00,   4.11673234e-01,   1.08365682e+00,
         7.05694616e+00,   7.80275599e-01,   8.77392585e+00,
         1.05755003e+00,   4.67625818e-01,   6.68668107e-01,
         3.40272305e+00,   1.50823944e+00,   5.82878212e-01,
         3.05452189e+00,   6.32187436e-01,   3.42986659e+00,
         5.57600878e-01,   3.25931305e-01,   7.97981917e+00,
         6.44587244e+00,   1.42597878e+00,   3.70319360e-01,
         3.71126567e-01,   1.70236004e+00,   1.03518121e-01,
         8.82578313e-01,   6.23178047e+00,   2.16298869e+00,
         3.75789585e-01,   5.75937620e-01,   5.72292769e+00,
         4.28934757e-01,   1.55494164e+01,   2.15574198e+00,
         1.27592849e+01,   2.49707772e+00,   3.12333905e+00,
         9.29220586e-01,   1.16302042e+01,   5.39818008e-01,
         8.34891177e-02,   3.59769306e-01,   2.65254890e+00,
         6.87899732e-01,   4.16599825e-01,   2.99188085e-01,
         7.21288043e-01,   1.21894551e+00,   1.25676521e-01,
         2.44136202e+00,   2.62319992e-01,   3.63697530e-01,
         1.52798424e+01,   6.23493693e-01,   9.69426593e-01,
         8.86230339e-01,   9.87246007e+00,   1.18514195e+00,
         3.00611256e+00,   3.98091656e+00,   1.57167221e+00,
         1.58944113e-01,   1.77849706e-01,   8.97924127e-01,
         5.17795100e-01,   8.20969996e+00,   6.63180609e-01,
         7.10304409e-01,   1.68782434e+00,   3.96113024e-01,
         1.19060186e+00,   8.50783915e-02,   6.13803494e-01,
         1.73269913e+00,   8.55969584e-01,   1.64131594e+00,
         8.58613893e-02,   9.81661750e-02,   2.78759789e+00,
         9.59956310e-01,   2.29773958e-01,   1.61492699e+00,
         1.01034599e+00,   7.18872588e-01,   1.62706127e+00,
         5.32838042e-01,   1.30215206e+01,   1.94416009e+00,
         1.41992387e+00,   8.87928409e-01,   1.11943087e+00,
         1.31482739e+00,   8.77962887e+00,   2.42889940e+00,
         4.75109403e-01,   7.85464398e-01,   1.40331539e+01,
         7.98775271e-01,   9.71203096e-01,   2.10326002e-01,
         7.51093550e-01,   7.55866212e-01,   5.08198076e+00,
         8.73035578e-01,   8.18731976e-01,   7.57240126e-01,
         9.17577513e-01,   2.58378134e+00,   9.68288124e-01,
         2.58742199e-01,   8.87906654e-01,   8.73528970e-01,
         4.12566626e+00,   6.16232432e-01,   1.18261196e+00,
         5.78051511e-02,   4.06421396e-01,   5.28898986e-01,
         4.34687315e-01,   1.17460558e+00,   1.86055543e+00,
         2.28451450e+00,   1.17556012e+00,   1.16568311e+00,
         5.76192882e-01,   2.64970486e+00,   3.64037778e-02,
         3.36642247e+00,   2.79562791e-01,   4.77165389e-01,
         2.02370419e+00,   5.61602158e-01,   6.80329496e-01,
         4.44305421e-01,   2.39866548e-01,   2.39478161e-01,
         5.85566976e+00,   9.70503483e-01,   2.92538702e-02,
         4.08999104e-01,   1.04275923e+00,   9.11360662e-01,
         1.63302059e+01,   6.13895392e-01,   6.41138518e-01,
         4.38856073e-01,   7.55595165e-01,   4.52787289e-01,
         9.17066028e-01,   9.98960005e-01,   9.05609764e-01,
         1.17912414e+01,   4.76532638e+00,   3.83256190e-01,
         7.45918534e-01,   2.63845808e-01,   4.92929460e-01,
         4.41060765e+00,   1.18395740e+00,   6.44723212e-01,
         9.50190133e-01,   5.26943393e+00,   3.41989856e-01,
         1.46151390e-01,   9.91187341e-01,   3.74914605e-01,
         3.50475564e-01,   3.99430120e-01,   4.57232247e+00,
         8.87295603e-01,   4.56169268e+01,   6.09452849e-01,
         1.25562620e+00,   2.04728410e-01,   1.85450443e-01,
         3.03317551e-01,   8.13703930e-01,   8.21422397e-01,
         1.00470432e+00,   1.39683388e+00,   2.75117273e+00,
         8.97235732e-01,   4.80145610e-01,   2.80744313e-01,
         2.25000729e+00,   1.04329198e+00,   7.37398006e-01,
         4.57503851e-02,   6.21536872e-01,   3.50722773e+00,
         1.07869960e+00,   1.24943756e+01,   4.24462972e-01,
         7.56106525e-01,   2.06938220e+01,   7.79192078e-01,
         3.87813245e+00,   3.91382246e-01,   3.91356634e+00,
         1.55792478e+00,   8.12813562e-01,   1.80971685e+00,
         3.04944417e-01,   1.62720395e+00,   1.15431632e+00,
         6.07205565e+02,   1.25670235e+00,   5.47683106e-01,
         1.32949275e+00,   3.73279210e-01,   3.17136980e+00,
         7.14185444e-01,   3.81929796e-01,   5.59392996e-01,
         1.05444945e+00,   1.31831189e+00,   4.40927090e-01,
         5.85441303e-01,   2.23901127e+00,   1.33555183e+00,
         2.16869335e-01,   1.55244225e+00,   1.45194147e+00,
         4.22463028e-01,   1.37626564e-02,   8.15412765e-02,
         2.58923475e-01,   1.30671965e+00,   3.06151599e+00,
         4.69780031e+00,   1.17041119e+00,   1.24183673e+00,
         1.16139820e+00,   3.54258641e-01,   1.06363253e-01,
         9.50671285e-01,   1.49640632e-02,   2.74874442e+01,
         2.32426650e-01,   1.45632953e+00,   8.32217316e-01,
         1.74344901e+00,   3.51001660e-02,   7.65829653e-01,
         6.79054740e-01,   4.03101698e-01,   2.27105338e+00,
         3.05077796e-01,   2.70275626e+00,   2.44444801e+01,
         1.27223220e+00,   1.15518156e+00,   9.88358832e-01,
         2.40284960e+01,   2.19696964e+00,   7.19168306e-01,
         5.88514603e-01,   5.36372643e-02,   1.02985215e+00,
         1.39317432e+00,   1.20417993e+00,   3.92851264e+00,
         2.55098064e-01,   2.97730572e+00,   1.47670272e+00,
         1.75931540e+01,   1.50416383e+00,   9.98194194e-01,
         1.05608100e+00,   1.19696332e+00,   8.04538184e-01,
         2.49083176e+00,   4.94317238e+00,   5.99041563e-01,
         1.29165325e+00,   9.11602128e-01,   1.18541479e+00,
         2.75998541e+00,   3.36211447e-01,   5.52752812e+00,
         5.36822909e-01,   1.44384595e+00,   8.51859461e-01,
         1.84727089e-01,   1.78105607e+00,   9.45413833e-01,
         3.91464470e-01,   1.45226927e+00,   4.56882417e+00,
         3.23279597e-01,   5.02394650e-01,   2.79720834e-01,
         5.47264809e-03,   6.95355196e-01,   1.73857472e-01,
         1.11905975e-01,   1.61306002e-01,   4.10279860e-01,
         1.43009922e+00,   9.52697148e-01,   9.43767688e-01,
         4.28221334e-01,   4.82637180e-01,   8.62936895e-01,
         3.86295549e-01,   2.30748171e+00,   3.63177336e+00,
         6.35588687e+00,   2.92472429e-01,   2.94631479e+00,
         2.64917015e+00,   1.12598059e+00,   3.84818978e-01,
         1.49288106e+00,   1.24625027e+00,   2.34147082e+01,
         3.89642879e-01,   2.08088477e+00,   1.25491453e+00,
         2.31193434e+00,   6.31704680e-01,   3.77210234e+01,
         5.96381662e-01,   4.17912618e-01,   1.28741137e+00,
         1.85405769e+00,   1.58868381e+00,   4.77873333e-02,
         7.69661151e-01,   3.82832446e-01,   2.98955927e-01,
         3.59762258e-01,   4.21588739e-01,   1.09121551e+02,
         8.18140677e-01,   2.24792875e+00,   5.76122690e-01,
         6.14704460e-01,   2.74946311e+00,   1.73384942e+00,
         2.72619296e-01,   1.15108058e+00,   1.46532017e+00,
         4.17238825e-01,   1.63569547e-01,   2.26101389e-01,
         1.96898497e-01,   8.55290767e-01,   1.48079444e-01,
         6.15021566e-02,   3.47629488e+00,   1.02068555e+00,
         1.58379582e-01,   1.07779376e+00,   1.27776343e+00,
         5.65660969e-01,   3.06580278e+00,   8.54103197e-01,
         9.33322363e-01,   1.32288837e+00,   2.89292170e+00,
         2.68079471e+00,   6.27513798e+00,   2.68216517e+00,
         1.38120367e+00,   2.24789440e+00,   1.12590323e+01,
         1.23183287e+01,   3.66972973e-01,   7.19549163e-01,
         6.60821304e-01,   8.49577332e-01,   1.28567018e+00,
         7.14888833e-01,   5.30359306e+00,   8.98886709e-02,
         8.06354980e-01,   6.59172910e-01,   1.23160059e+00,
         2.67672781e-01,   1.50102275e+01,   8.45912032e-01,
         6.46388460e-01,   3.64657520e-01,   2.26484271e-01,
         2.78816249e-01,   6.40678324e-01,   1.82318162e+00,
         1.78446252e+00,   2.06668518e+00,   8.30151119e-01,
         1.99972811e+00,   1.46512107e+01,   2.23154714e-01,
         4.71803572e-01,   7.56309045e-01,   1.60380769e+00,
         1.84611117e+00,   6.73622304e-01,   4.30974937e+00,
         1.21070892e+00,   4.99101724e+00,   3.62506823e-01,
         3.94076851e-01,   1.23144585e+00,   3.59183830e-01,
         1.49975229e+00,   7.30241214e-01,   1.68231874e+00,
         1.13429555e+00,   2.49510181e-02,   3.52321515e-01,
         1.15308477e+00,   4.08429269e-02,   2.98791751e+00,
         8.58213860e-01,   1.94847847e+00,   2.19283657e+00,
         6.23860542e+00,   3.62673574e-01,   2.41864620e-01,
         5.58436437e-01,   1.39445544e+00,   1.07374472e+00,
         6.23670544e-01,   7.55377374e-01,   5.58119238e+00,
         4.82231548e-01,   7.35472783e-01,   2.42858054e-01,
         4.54670098e-01,   3.04494738e+00,   1.09559174e+00,
         2.21414319e+00,   4.37506420e-01,   3.04225393e+00,
         4.69762750e-01,   3.53285106e-02,   1.61053319e+00,
         9.46049993e-01,   2.13176623e+00,   6.56490324e+00,
         4.54721600e-01,   8.66697614e-01,   1.49813900e-01,
         9.99016325e-01,   3.49589382e-02,   1.72876257e+00,
         6.75318339e+00,   1.25179457e+00,   2.87434908e+00,
         1.65881458e-01,   3.44844290e-01,   3.22442461e-01,
         7.13531793e-01,   2.56645729e+01,   3.49984781e-02,
         6.53521779e-01,   1.92608042e+00,   4.69987292e+00,
         3.04844477e-01,   7.63258624e-01,   6.32631492e+00,
         5.16499746e-01,   1.68561775e-01,   1.21631737e+01,
         1.30254464e-01,   3.73551128e-01,   9.01656335e-01,
         3.47538474e+00,   5.54407958e-01,   6.06577068e-01,
         5.25718123e-02,   1.99584536e+00,   2.62262341e+00,
         5.73845021e+00,   7.67138350e-01,   1.62829046e+00,
         8.89296667e-01,   1.76769651e+00,   3.01282820e-01,
         2.09902968e+00,   2.32301545e+00,   1.29588604e+00,
         4.42909374e+00,   1.56959146e+00,   1.43703626e-01,
         7.74386019e-01,   5.03951021e+00,   3.86259107e-01,
         1.44829349e+00,   2.37116079e+00,   4.11286746e+02,
         4.94131442e+00,   6.66596198e+00,   1.58143271e+00,
         3.12085788e-01,   2.20713118e-01,   2.09247355e-01,
         3.46340670e+00,   7.04042560e-01,   6.92874418e-01,
         1.56423634e+00,   9.28070670e-01,   1.31806533e-01,
         7.15207750e+00,   8.51460646e+00,   3.45632181e-01,
         1.13211459e-01,   1.75798662e+00,   3.14147324e+01,
         4.26560842e-02,   6.34004827e-01,   9.63519070e-01,
         4.60200962e-01,   3.68819611e-01,   8.11043445e-01,
         7.37632165e+00,   3.44169194e+00,   6.65366189e-01,
         6.43898766e-02,   4.06345350e-02,   6.16398986e-01,
         1.36997303e+00,   6.59559293e+00,   6.44207470e-01,
         2.79782796e-01,   1.87760230e+00,   2.54048927e-01,
         3.93564453e-01,   1.97701197e+00,   5.41135616e-01,
         1.59509689e+00,   1.65483552e-01,   9.51726557e-01,
         8.82626231e-01,   2.50313359e+00,   8.19505104e-02,
         9.77979207e-01,   1.02052071e+00,   1.04343251e-02,
         1.04393983e+00,   1.35985716e+00,   2.41348282e+01,
         2.62046847e-01,   1.20275124e-01,   1.08012358e+00,
         2.59032843e+00,   8.51322683e-01,   1.89421261e+00,
         1.16194584e+00,   1.33509032e+00,   1.48539229e+00,
         3.32759007e+00,   1.37455503e+00,   2.59205548e+00,
         4.36490393e+00,   9.48565955e-01,   2.89089235e-01,
         3.20038387e-01,   5.82801362e-01,   2.64818460e+00,
         4.73021948e+00,   1.12491733e+00,   3.35185527e-01,
         6.50282688e-02,   1.95711561e+00,   9.69271689e+00,
         9.65951614e-01,   3.44899023e+01,   1.43652827e+00,
         1.84985657e+00,   5.91662966e-01,   6.16489728e-01,
         6.80730097e-02,   2.27350122e+00,   1.45862062e-01,
         7.22501658e-01,   1.17074912e+00,   6.59522079e-01,
         7.09843470e-01,   2.66670390e-01,   1.14142051e+00,
         3.76039180e-01,   4.71613381e-01,   1.51698545e-01,
         1.38247594e-01,   6.08223492e-01,   8.56260821e-01,
         9.56220784e-01,   7.65733105e+00,   3.83513530e-01,
         5.43847585e-01,   2.94784978e-01,   9.81716813e-01,
         4.13307325e+00,   3.00563430e+00,   1.04893611e+00,
         8.59102022e-01,   1.67312307e+00,   2.44500512e+00,
         3.13814923e-01,   6.51996727e-01,   1.51068385e-01,
         1.30056494e+00,   4.98996113e-01,   3.91031465e+00,
         4.42457524e-01,   3.42890635e-02,   1.26886402e+00,
         8.64761328e-01,   1.99800454e-01,   1.40098939e+00,
         1.58668903e+00,   1.05065130e-01,   3.38848491e+00,
         9.89216994e-01,   3.06340731e-01,   3.80442341e-01,
         1.00519969e+00,   5.18582590e+00,   2.10486210e-01,
         9.68759175e+00,   4.67128248e-01,   5.31564792e-01,
         4.33805321e+00,   1.06667037e+00,   4.16533009e-01,
         1.16839141e+00,   2.70327507e-01,   6.00054279e-01,
         3.81709104e+00,   3.32903504e-01,   1.82359610e-01,
         4.54289818e+00,   5.16502619e-01,   4.20780624e+00,
         1.04198559e+00,   5.42314355e+00,   2.34762380e+00,
         7.04694318e-01,   2.32089284e-01,   1.18855900e+00,
         6.93665723e-01,   8.11136521e-01,   5.19655084e-01,
         1.10189702e-01,   7.41269113e+00,   9.99585052e+00,
         1.47259188e+00,   5.27072570e-01,   8.26295290e+00,
         1.58678949e+00,   1.26326283e+01,   1.33498595e+00,
         4.91953850e-01,   2.32579271e+00,   4.12984456e-01,
         8.16887416e-01,   1.08964546e+00,   1.85120163e+00,
         9.63064540e-01,   2.15514518e-01,   5.92373103e-01,
         7.04693406e-01,   1.06462438e+00,   1.15076825e+00,
         1.42919365e-01,   4.50666578e-02,   5.24886437e-02,
         4.94843253e-01,   1.48399552e-01,   7.00541596e-01,
         5.32975657e-01,   3.10286036e-01,   2.20838836e-02,
         2.79220305e-01,   1.24058488e+00,   4.48228521e-01,
         2.03292087e+00,   4.66492441e-01,   5.47002663e-01,
         3.61665130e-01,   7.05727272e-01,   4.92397825e+00,
         7.61480456e-01,   1.26386230e+01,   2.83124824e-01,
         1.10679879e+00,   2.20368901e+00,   4.85368373e+00,
         2.12718041e+00,   5.27991211e+00,   4.24455273e-01,
         4.66890378e-01,   1.31416763e+00,   2.22209431e+00,
         4.47613743e-01,   4.55608864e-01,   2.11971623e-01,
         6.15109196e-04,   8.39843483e-01,   1.66782566e-01,
         3.43169316e-01,   1.45392803e+00,   3.66278072e-01,
         4.92458153e-02,   2.56083232e+00,   1.75996185e+00,
         9.54398520e-01,   4.82764364e+00,   2.87432946e-02,
         5.73576336e+00,   5.74571032e-01,   1.25600100e+00,
         1.56633229e-01,   1.81061817e+00,   3.44696401e-01,
         1.31173270e-01,   2.50626139e+01,   6.73644357e-01,
         1.20938431e+00,   1.05982247e+00,   8.39559855e-01,
         1.02846683e-01,   2.09804454e-01,   9.80313350e-01,
         4.06804867e+00,   8.45234190e+00,   7.35938576e+00,
         1.80996516e-01,   5.53220834e-01,   1.31000948e+00,
         5.08619592e+00,   3.02742024e-01,   1.01819599e+00,
         1.88888165e-01,   1.21719054e+00,   1.62210929e+00,
         1.35178460e+00,   1.22286296e+00,   2.66137009e+00,
         2.83442693e+00,   2.73326030e+00,   1.23719909e+00,
         5.97787613e+00,   9.71617736e-01,   7.06148061e-01,
         1.54826781e+00,   3.28345561e-01,   2.58728790e-01,
         6.22612421e-01,   5.39950808e-01,   1.69227434e-01,
         1.94500022e+00,   2.13764913e-01,   3.17059329e+00,
         2.65915671e-01,   1.85903006e+00,   1.36997439e+00,
         1.19842759e+00,   5.00119266e+00,   2.71176917e+00,
         1.41863831e+00,   9.16119745e-01,   9.83990966e-03,
         2.40014880e-01,   8.87509252e-01,   7.56968744e-01,
         1.09469400e+00,   6.80102203e+00,   2.18206997e+00,
         2.93086278e+00,   2.12514049e+00,   6.94596414e-01,
         1.98712242e-01,   3.35278072e-01,   1.91625240e+00,
         1.82958919e+00,   2.48857995e-01,   7.45842221e-01,
         1.58098892e+00,   7.37766589e-01,   8.10895085e-01,
         4.27293478e-01,   3.44203112e-01,   9.13357978e-01,
         1.15129546e+00,   6.62642923e-01,   7.02279833e-01,
         8.85445376e-02,   9.75711900e-01,   9.42433092e-01,
         9.80813167e-01,   1.49444409e-01,   2.38460016e-01,
         1.06399225e+00,   5.51063064e-01,   4.14223370e-01,
         6.83413360e-01,   1.69505307e-01,   9.56682611e-01,
         2.56748973e-01,   6.30985781e-01,   2.37938144e-03,
         2.12977594e+00,   9.45935016e-01,   5.42984636e+00,
         7.25731361e-01,   2.12680403e+00,   9.76401102e-01,
         1.41018813e+00,   1.40618965e+00,   1.91382781e+00,
         1.89737514e+00,   6.94179205e+00,   4.47657399e+00,
         1.94145053e+00,   2.46516647e-01,   2.08918211e+00,
         5.76271349e-01,   7.17652008e-01,   7.94045429e-01,
         8.94867565e-01,   4.58604494e-01,   2.24338815e+00,
         1.06395320e+00,   1.86580400e-01,   1.46511414e+00,
         1.49108536e+01,   2.25299218e+00,   2.90608297e+00,
         7.76626968e-01,   2.53323730e-01,   2.18378525e+00,
         5.32533705e-01,   5.67563513e+00,   1.59499422e+00,
         1.11274684e+00,   4.98427845e+01,   2.59930346e+00,
         1.09794997e+00,   1.73966366e+00,   3.41979830e-01,
         1.06857704e+01,   1.39434030e+00,   2.73529408e+00,
         8.72588045e-01,   1.94149520e+00,   4.71721309e-01,
         1.08712187e-01,   1.71621534e+00,   2.79317014e+00,
         3.40885911e-01,   5.86515608e-01,   1.09971035e+01,
         1.92940537e+00,   4.04263387e-01,   2.32952343e+00,
         9.39675299e-01,   1.50293702e+01,   1.92827460e-01,
         2.88481053e+00,   1.59726999e+00,   3.90483205e-01,
         1.59084853e-01,   8.57895810e+01,   1.22894842e+00,
         2.59842563e-01,   6.48018015e+00,   2.96316459e+00,
         1.57722209e+01,   1.37384464e-01,   7.39289128e-01,
         2.19077070e+00,   3.38289042e-01,   3.36267487e-01,
         1.22680770e+00,   4.70734450e-02,   6.74699384e-01,
         9.55777916e-01,   1.91331551e+00,   3.63179131e-01,
         1.06371523e-01])

There is a lot more that SciPy is capable of, such as Fourier Transforms, Bessel Functions, etc...

You can reference the Documentation for more details!