Many unary operations, such as computing the sum of all the elements
in the array, are implemented as methods of the ndarray class. By
default, these operations apply to the array as though it were a list
of numbers, regardless of its shape. However, by specifying the axis
parameter you can apply an operation along the specified axis of an
array:
使用
axis
参数:查看^{} 的文档,特别注意
axis
参数。对列求和:或者,对行求和:
其他聚合函数,如^{} 、^{} 和^{} ,例如,也接受
axis
参数。从Tentative Numpy Tutorial:
使用^{} 。对你来说,是的
相关问题 更多 >
编程相关推荐