numpy.matrix.trace# method matrix.trace(offset=0, axis1=0, axis2=1, dtype=None, out=None)# 返回数组沿对角线的和. 请参考 numpy.trace 的完整文档. 参见 numpy.trace等效函数