Numpy 简明教程

NumPy - Introduction

NumPy 是一个 Python 包,代表“Numerical Python”。它是一个包含多维数组对象和一组阵列处理例程的库。

NumPy is a Python package. It stands for 'Numerical Python'. It is a library consisting of multidimensional array objects and a collection of routines for processing of array.

Numeric 的祖先 NumPy 是由 Jim Hugunin 开发的。另一个软件包 Numarray 也得到了开发,具有其他一些功能。2005 年,Travis Oliphant 创建了 NumPy 包,将 Numarray 的功能合并到 Numeric 包中。许多贡献者参与了这个开源项目。

Numeric, the ancestor of NumPy, was developed by Jim Hugunin. Another package Numarray was also developed, having some additional functionalities. In 2005, Travis Oliphant created NumPy package by incorporating the features of Numarray into Numeric package. There are many contributors to this open source project.

Operations using NumPy

使用 NumPy,开发人员可以执行以下操作 −

Using NumPy, a developer can perform the following operations −

  1. Mathematical and logical operations on arrays.

  2. Fourier transforms and routines for shape manipulation.

  3. Operations related to linear algebra. NumPy has in-built functions for linear algebra and random number generation.

NumPy – A Replacement for MatLab

NumPy 通常与 SciPy (科学 Python)和 Mat−plotlib (绘图库)等软件包一起使用。这种组合广泛用作 MatLab 的替代品,后者是技术计算的流行平台。但是,Python 替代版 MatLab 现在被视为一种更现代、更完整的编程语言。

NumPy is often used along with packages like SciPy (Scientific Python) and Mat−plotlib (plotting library). This combination is widely used as a replacement for MatLab, a popular platform for technical computing. However, Python alternative to MatLab is now seen as a more modern and complete programming language.

它是开源的,这是 NumPy 的一个额外优势。

It is open source, which is an added advantage of NumPy.