numpy 统计函数

numpy 库中含有很多统计学函数。

在numpy - ref - 1.14.pdf 文件的3.27 statistics  章节 中

1 排序统计 order statistics

1.1 最小值 amin()

numpy.amin(a, axis=None, out=None, keepdims=<class ’numpy._globals._NoValue’>)

参数

a - 输入的数据 array_like

axis - 

Return the minimum of an array or minimum along an axis.
返回一个数组的最小值或最小值沿一个轴。

语法:

amin(a[, axis, out, keepdims]) Return the minimum of an array or minimum along an axis

amin(a[, axis, out, keepdims]) Return the minimum of an array or minimum along an axis.
amax(a[, axis, out, keepdims]) Return the maximum of an array or maximum along an
axis.
nanmin(a[, axis, out, keepdims]) Return minimum of an array or minimum along an axis,
ignoring any NaNs.
nanmax(a[, axis, out, keepdims]) Return the maximum of an array or maximum along an
axis, ignoring any NaNs.
Continued on next page
1162 Chapter 3. RoutinesNumPy Reference, Release 1.14.5
Table 166 – continued from previous page
ptp(a[, axis, out]) Range of values (maximum - minimum) along an axis.
percentile(a, q[, axis, out, . . . ]) Compute the qth percentile of the data along the specified
axis.
nanpercentile(a, q[, axis, out, . . . ]) Compute the qth percentile of the data along the specified
axis, while ignoring nan values.

用于从数组中给定的元素中查找最小,最大,百分标准差和方差等。 函数说明如下:

猜你喜欢

转载自www.cnblogs.com/gengyi/p/9296199.html