# numpy函数解析

numpy.memmap

class numpy.memmap

create a memory-map to an array stored in a binary file on disk.

Memory-mapped files are used for accessing small segments of large files on disk, without reading the entire file into memory. Numpy's memmap's are array-like objects. This differs from Python's mmap module, which uses file-like objects.

numpy.diff

numpy.diff(a, n=1,axis=-1)

Calculate the n-th order discrete difference along given axis.

The first order difference is given by out[n]=a[n+1]-a[n] along the given axis, higher order differences are calculated by using diff recursively.

numpy.arange

numpy.arange([start,]stop,[step,]dtype=none)

Return evenly spaced values within a given interval.

numpy.reshape

numpy.reshape(a, newshape, order='C')

newshape: int or tuple or ints

The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D array of that length. One shape dimension can be -1. In  this case, the value is inferred from the length of the array and remaining dimensions.

numpy.mean
numpy.mean(a, axis=None, dtype=None, out=None, keepdims=False)
Compute the arithmetic mean along the specified axis.
Returns the average of the array elements. The average is taken over the flattened array by default, otherwise over the specified axis. float64intermediate and return values are used for integer inputs.

numpy.sqrt
numpy.sqrt(x[, out])
Return the positive square-root of an array, element-wise.
>>> np.sqrt([1,4,9])
array([ 1., 2., 3.])
numpy.vectorize
numpy.vectorize(pyfunc, otypes='')
Generalized function class.
Define a vectorized function which takes a nested sequence of objects or numpy arrays inputs and returns a numpy array as output. The vectorized function evaluates pyfunc over successive tuples of the input arrays like the python map function, except it uses the broadcasting rules of numpy.
The data type of the output of vectorized is determined by calling the function with the first element of the input. The can be avoided by specifying the otypes argument.

numpy.array

numpy.array(object, dtype=None, copy=True, order=None, subok=False, ndmin=0)
Create an array.
object: array_like
An array, any object exposing the array interface, an object whose __array__ method returns an array, or any (nested) sequence.
dtype: data-type, optional
The desired data-type for the array. If not given, then the type will be determined as the minimum type required to hold the objects in the sequence. This argument can only be used to 'upcast' the array. For downcasting, use the .astype(t) method.

numpy.asarray

numpy.asarray(a)

numpy.empty

numpy.empty(shape, dtype=float, order='C')

numpy.vstack

numpy.vstack(tup)

#### numpy教程：函数库和ufunc函数

2014-09-12 21:55:32

#### Python Intro - Numpy function vectorize

2015-04-15 11:04:48

#### python-numpy.vectorize()

2017-11-09 09:44:10

#### 【Python】无须numpy，利用map函数与zip(*)函数对数组转置

2015-12-13 16:19:41

#### numpy中一些常用函数的用法总结

2016-12-02 11:22:19

#### numpy的基本操作(矩阵、文件)

2014-04-05 18:12:05

#### python map() 和 numpy函数：fromfunction以函数式创建数组

2017-11-07 15:03:13

#### python 中 常用到的 numpy 函数 整理

2013-11-26 14:52:20

#### numpy diff函数

2017-11-17 11:00:47

#### diff函数

2018-06-11 16:15:41