Python------SCIPY Module

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.