N
NumPysystem isPythonAn open-source digital extension. Such a tool can be used to store and process large matrices,Pythona nested list of its own (nested list structure)structures are much more efficient (the structure can also be used to represent matrices (Matrix)). is saidNumPywill bePythonthe equivalent of becoming a free, more powerfulMatLabSystem.
a Usepythonimplementation of the scientific computing package. Includes:1, a powerfulNDimension Array ObjectArray;2, a relatively mature (broadcast) function library;3, for IntegrationC + +and theFortranCode of the toolkit;4, useful linear algebra, Fourier transform, and random number generation functions. NumPyand sparse matrix operations packagesscipyIt is more convenient to use together.
NumPy(Numeric Pythonprovides a number of advanced numerical programming tools, such as: Matrix data type, vector processing. And a sophisticated computing base.
Designed for rigorous digital processing. It is used by very many large financial companies. As well as core scientific computing organizations such as:lawrencelivermore,NASA uses it to deal with some of the original C + +. tasks such as Fortran or Matlab .
Git clonehttps://bitbucket.org/pypy/numpy.git
CD NumPy
PyPy Setup.pyinstall
[Email protected]:~ $pypy
Python 2.7.6 (32F35069A16D819B58C1B6EFB17C44E3E53397B2, June 26 2014, 21:49:19)
[PyPy 2.3.1 with GCC 4.6.3] on linux2
Type "Help", "copyright", "credits" or "license" for more information.
>>>> Import NumPy as NP
>>>>
the whole content of this blog is original. If reproduced please indicate the sourcehttp://blog.csdn.net/myhaspl/
More convenient than the Python standard library. NumPy provides an n-dimensional array type Ndarray, which is a container type. Data items of the same type and size are stored. Ndarray can be sliced, have an integer index, each data item occupies the same memory space, and the number of dimensions of an array object is defined by the shape attribute. This is a tuple, and the type of the data item is defined by Dtype.
>>>> Myx=np.array ([[11,22,33],[44,55,66]])
>>>>myy=np.array ([Myx,myx])
>>>> Myy
Array ([[[[11], 22,33],
[44, 55, 66]],
[[11, 22, 33],
[44, 55, 66]])
>>>>MYX[0]=[111,222,333]
>>>> Myy
Array ([[[[11], 22,33],
[44, 55, 66]],
[[11, 22, 33],
[44, 55, 66]])
>>>>myx.dtype
Dtype (' int32 ')
>>>>myy.dtype
Dtype (' int32 ')
>>>>myy.shape
(2, 2, 3)
>>>>myx.shape
(2, 3)
>>>>
The above code demonstrates basic use. The Ndarray object itself can be a data item that also has a Ndarray object, generating a copy, so the changes to the inline object do not have side effects.
Mathematical Road-python Calculation (5)-Initial knowledge numpy and PyPy execution numpy