numpy.ndarray.trace

方法

ndarray.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)

沿数组的对角线返回和。

参照 numpy.trace 完整文件。

参见

numpy.trace

等效函数