Python data processing and calculation--Overview

Source: Internet
Author: User
Tags mathematical functions traits

Python is an object-oriented, dynamic programming language with a very concise and clear syntax that is suitable for accomplishing a variety of high-level tasks. It can be used to quickly develop program scripts or to develop large-scale software.

With the development of NumPy, SciPy, Matplotlib, Enthoughtlibrarys and many other libraries, Python is becoming more and more suitable for scientific computing and high-quality 2D and 3D images. Compared with the most popular business software matlab in the field of scientific computing, Python is a universal programming language that is more widely used than the scripting language used by MATLAB and has more support from libraries. While many of the advanced features and toolbox in MATLAB are still irreplaceable, there are still a lot of things that can be done with Python in everyday research and development.

Overview and import of commonly used modules

1. Numerical Calculation Library

NumPy provides Python with the ability to provide fast multidimensional data processing, while scipy adds a variety of tools that are needed for scientific computing on a numpy basis, and Python has the ability to process data and compute almost as much as Matlab.

NumPy and SCIPY official web sites are http://www.numpy.org/and https://www.scipy.org/, respectively.

NumPy brings real multidimensional data processing capabilities to Python and provides a rich library of functions to handle these arrays. It will be used in the array of mathematical functions, so that these mathematical functions can be directly in the operation of the array, will need to be in the python level of the loop, put into the C language operations, obviously improve the program's operation speed.

The core calculations of SCIPY are some of the tried and tested Fortran numerical computing libraries, such as:

    • Linear algebra using Lapack library;
    • Fast Fourier transform using Fftpack library;
    • The solution of ordinary differential equation uses Odepack library;
    • Using Minpack library for solving nonlinear equations and solving the minimum value

2. Symbol Calculation Library

SymPy is a set of Python function libraries for symbolic math operations, which is good enough to help us with formula derivation and symbolic solution.

SymPy Official website: http://www.sympy.org/en/index.html

3. Interface Design

The production interface has always been a very complex task, and using the traits library will allow us to focus on how to handle the data by eliminating the need to expend a lot of effort on the interface design.

Traits official website: http://code.enthought.com/pages/traits.html

The traits library is divided into two parts, traits and Traitsui, and traits adds a type-defined function to Python, with its defined traits attribute having many functions such as initialization, validation, proxy, event, and so on.

Traitsui Library based on the traits library, using the MVC structure to quickly define the user interface, in the simplest case, the coder does not need to write a code about the interface, you can use the traits attribute definition to obtain a working user interface. Programs written using the Traitsui library automatically support the Wxpython and PYQT two classic interface libraries.

4. Drawing and Visualization

Chaco and Matplotlib are excellent 2D drawing libraries, and the Chaco Library and the traits library are closely connected to create dynamic interactive charting capabilities. The Matplotlib library is able to quickly draw beautiful charts, output in a variety of formats, and feature a simple 3D drawing.

Chaco Official Website: http://code.enthought.com/projects/chaco/

Matplotlib Official website: https://matplotlib.org/

The TVTK library is encapsulated on the standard VTK library with the traits library, and TVTK is a good choice if you want to use VTK under Python. Mayavi2, on the basis of TVTK, adds a set of application-oriented convenience tools that can be used as a 3D visualizer or embedded in the user's program quickly.

Mayavi Official website: http://code.enthought.com/pages/mayavi-project.html

The Visualizer library (visualization TOOLKIT,VTK) is an open source, cross-platform, support for parallel processing (VTK has used and processed nearly 1 petabyte of data, the platform for the United States Los Alamos Library of graphics applications for all large systems with 1024 processors in the National Laboratory. 2005 was used by the United States Army Research Laboratory to simulate the Russian anti-missile chariot zsu23-4 by plane wave attack, its compute nodes are up to 2.5 trillion.

In addition, using the visual library makes it quick and easy to make 3D animated presentations that make data results more convincing.

Visual Official Website: http://vpython.org/

5. Image processing and computer vision

OPENCV is initiated and developed by Intel Corporation and is licensed for distribution in the BSD license and is available free of charge in the commercial and research fields. OpenCV can be used to develop real-time image processing, computer vision and pattern recognition programs. The Python API provided by OPENCV allows us to quickly implement algorithms, view results and exchange data with other libraries.

A concise handbook of Python from the data librarian

Python data processing and calculation--Overview

Related Article

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.