numpy之sum

Posted Google-boy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了numpy之sum相关的知识,希望对你有一定的参考价值。

Definition : sum(a, axis=None, dtype=None, out=None, keepdims=False)

axis: None or int or tuple of ints, optional

Axis or axes along which a sum is performed. The default, axis=None, will sum all of the elements of the input array. If axis is negative it counts from the last to the first axis.

New in version 1.7.0.

If axis is a tuple of ints, a sum is performed on all of the axes specified in the tuple instead of a single axis or all the axes as before.

 

以上是关于numpy之sum的主要内容,如果未能解决你的问题,请参考以下文章

数据分析之numpy篇

NumPy之:NumPy简介教程

Python 之 NumPy 简介和创建数组

Numpy 基础教程之Numpy的介绍

Numpy 基础教程之Numpy的介绍

简单 Python 快乐之旅之:Python 基础语法之 Numpy 专题