SCIPY is an advanced module based on NumPy, which has outstanding performance in symbolic computation, signal processing and numerical optimization, and covers most of the scientific computing fields.
Sub-module name |
Description of Use |
Scipy.cluster |
The mainstream clustering algorithm |
Scipy.constants |
Mathematical and physical constants |
Scipy.fftpack |
Fast Fourier transform |
Scipy.integrate |
Solving integral and ordinary differential equations |
Scipy.linalg |
Linear algebra |
Scipy.ndimage |
n-dimensional image processing |
Scipy.signal |
Signal Processing |
Scipy.spatial |
Spatial data structures and algorithms |
Scipy.stats |
Statistical distributions and related functions |
My understanding of the SciPy module is most important: "Vectorization"----->>> "symbolic calculation" and "function vectorization"
fromSciPyImportpoly1dPrint "symbolic calculation of ******scipy ******"P=POLY1D ([3,4,5])PrintP#equivalent to 3x^2+4x+5Printp+PPrintP*p#equivalent to 9x^4+24x^3+46x^2+40x+25PrintP ([A])Print "indefinite integral of P (x), specifying a constant of 2"PrintP.integ (k=2) Print "first-order derivative of P (x)"PrintP.deriv (1)#1-order derivative is expressedPrintP.deriv (2)#2-order derivative is expressedPrint "********scipy function vectorization ********"ImportNumPy as NPdefCompare (A, b):ifA>B:returnA-bElse: returnA +bPrintCompare (10, 3)PrintCompare (4, 16) Vec_compare=np.vectorize (Compare)PrintVec_compare ([10,4,8,26],[3,16,8,7])
Results:
SciPy symbol calculation ****** x + 4 x + 5 x + 8 x + 4 3 x + x + + x + x + + [12 2 5]p (x) indefinite integral, the specified constant is 2 3 x + 2 x + 5 x + 26 x + 4 6********scipy function vectorization ********7207 2 0 16 19]
Python------SCIPY Module