mindspore.Tensor.diagonal

Tensor.diagonal(offset=0, axis1=0, axis2=1)[source]

For details, please refer to mindspore.ops.diagonal(). The parameter axis1 of the current interface is the same as the parameter dim1 of the reference interface, the parameter axis2 of the current interface is the same as the parameter dim2 of the reference interface.

Warning

Non-backward-compatible change after version 2.9.0: parameter names axis1, axis2 will be renamed to dim1, dim2.