x (Tensor): The input tensor. It can be any shape. Its data type should be float32, float64, int32, int64.
x (Tensor): The input tensor. It can be any shape. Its data type should be float16, float32, float64, int32, int64.
offset (int, optional): The diagonal offset. A positive value represents superdiagonal, 0 represents the main diagonal, and a negative value represents subdiagonal. Default: 0 (main diagonal).
name (str, optional): For details, please refer to :ref:`api_guide_Name`. Generally, no setting is required. Default: None.