NumPy

作者: 恒_3297 | 来源:发表于2018-02-02 01:46 被阅读0次

NumPy is the fundamental package for scientific computing in Python. It is a Python library that provides a multidimensional array object, various derived objects (such as masked arrays and matrices矩阵), and an assortment of routines for fast operations on arrays, including mathematical, logical, shape manipulation, sorting, selecting, I/O, discrete Fourier transforms离散傅里叶变形, basic linear algebra基本线性代数, basic statistical operations基本统计操作, random simulation随机模拟 and much more.

At the core of the NumPy package, is the ndarray object. This encapsulates n-dimensional arrays of homogeneous同种类 data types, with many operations being performed in compiled code for performance. There are several important differences between NumPy arrays and the standard Python sequences:

• NumPy arrays have a fixed size at creation, unlike Python lists (which can grow dynamically). Changing the

size of an ndarray will create a new array and delete the original.

• The elements in a NumPy array are all required to be of the same data type, and thus will be the same size in

memory. The exception: one can have arrays of (Python, including NumPy) objects, thereby allowing for arrays

of different sized elements.

• NumPy arrays facilitate advanced mathematical and other types of operations on large numbers of data. Typically, such operations are executed more efficiently and with less code than is possible using Python’s built-in

sequences.

• A growing plethora of scientific and mathematical Python-based packages are using NumPy arrays; though

these typically support Python-sequence input, they convert such input to NumPy arrays prior to processing,

and they often output NumPy arrays. In other words, in order to efficiently use much (perhaps even most)

of today’s scientific/mathematical Python-based software, just knowing how to use Python’s built-in sequence

types is insufficient - one also needs to know how to use NumPy arrays.

相关文章

  • 科学计算库numpy的执行示例

    numpy1 numpy2 numpy3 numpy4

  • numpy中的常量

    Constants 正无穷 numpy.inf numpy.Inf numpy.Infinity numpy.in...

  • NumPy学习资料

    Numpy 中文资料 NumPy 中文文档 NumPy 中文用户指南 NumPy 中文参考手册

  • Numpy基础

    安装Numpy Numpy Numpy属性 ndim:纬度 shape:行数和列数 size:元素个数 Numpy...

  • Numpy和Pandas基本操作速查

    """ numpy 基本操作 """'''安装 Numpy 的方法:pip install numpy''''''...

  • numpy 基础

    numpy 基础 导入numpy 版本 np常用方法 numpy.array 的基本属性 numpy.array ...

  • Numpy入门

    1、熟悉 numpy 的基础属性 2、numpy 创建 array 3、numpy的基础运算 4、numpy索引 ...

  • 学习:biopython的安装

    安装Numpy 因为使用biopython需要numpy的支持,所以需要先安装numpy。安装numpy过程如下:...

  • Numpy

    Numpy中文文档 # 基本语法 ``` import numpy myText = numpy.genfromt...

  • numpy运算

    numpy的与运算 numpy 中 argsort() numpy 中的布尔索引

网友评论

      本文标题:NumPy

      本文链接:https://www.haomeiwen.com/subject/doqszxtx.html