003 Scipy庫簡介


參考文檔補充原本的文檔:

  https://www.cnblogs.com/mrchige/p/6504324.html

一:原本的簡單介紹

1.Scipy庫

  Scipy庫是基於python生態的一款開源數值計算,科學與工程應用的開源軟件,包括常用的NumPy,pandas,matplotlib等庫。

  https://www.scipy.org/:

  

 

2.介紹

  SciPy是一款方便、易於使用、專為科學和工程設計的Python工具包.它包括統計,優化,整合,線性代數模塊,傅里葉變換,信號和圖像處理,常微分方程求解器等等.

  SciPy科學計算工具集,而不是完整的包含NumPy、Matplotlib的SciPy技術棧。

  Scipy庫構建於NumPy之上,提供了一個用於在Python中進行科學計算的工具集,如數值計算的算法和一些功能函數,可以方便的處理數據。主要包含以下內容

 

二:實驗Scipy(主要來源於文檔)

1.環境

  使用Spyder

  

 

2.特定函數

 1 # -*- coding: utf-8 -*-
 2 from numpy import *
 3 from scipy import *
 4 
 5 from scipy.special import jn, yn, jn_zeros, yn_zeros
 6 import matplotlib.pyplot as plt
 7 
 8 n = 0    # order
 9 x = 0.0
10 
11 # Bessel function of first kind
12 print "J_%d(%f) = %f" % (n, x, jn(n, x))
13 
14 x = 1.0
15 # Bessel function of second kind
16 print "Y_%d(%f) = %f" % (n, x, yn(n, x))
17 
18 x = linspace(0, 10, 100)
19 
20 fig, ax = plt.subplots()
21 
22 for n in range(4):
23     ax.plot(x, jn(n, x), label=r"$J_%d(x)$" % n)
24 ax.legend();
25 
26 fig

 

3.效果

  

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM