numpy.min(axis)用法

选择python,就是选择使用数学工具解决问题。
numpy中的矩阵运算功能可谓强大,但手册不多。规律要自己总结。

numpy.ma.min
numpy.ma.min(obj, axis=None, out=None, fill_value=None, keepdims=)[source]

Return the minimum along a given axis.

Parameters:

axis : {None, int}, optional

Axis along which to operate. By default, axis is None and the flattened input is used.

out : array_like, optional

Alternative output array in which to place the result. Must be of the same shape and buffer length as the expected output.

fill_value : {var}, optional

Value used to fill in the masked values. If None, use the output of minimum_fill_value.

Returns:

amin : array_like

New array holding the result. If out was specified, out is returned.

See also

minimum_fill_value
Returns the minimum filling value for a given datatype.

重点看看 axis,这里没有告诉你none、0、1表示啥。需要查找:

  • none:整个矩阵
  • 0:每列
  • 1:每行
上一篇:asp.net mvc HandleErrorAttribute 异常错误处理 无效!


下一篇:从平台搭建准备着手,全方位梳理一对一直播源码开发部署准备工作(一)