From 67ecabe98167638fcf530c568b8bf9fdef88a035 Mon Sep 17 00:00:00 2001 From: panzhihui Date: Tue, 20 Dec 2022 20:51:52 +0800 Subject: [PATCH] Fix tril/triu-indices docs --- mindspore/python/mindspore/ops/function/math_func.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/mindspore/python/mindspore/ops/function/math_func.py b/mindspore/python/mindspore/ops/function/math_func.py index 449643ce9fb..4543d215f75 100644 --- a/mindspore/python/mindspore/ops/function/math_func.py +++ b/mindspore/python/mindspore/ops/function/math_func.py @@ -5882,8 +5882,7 @@ def tril_indices(row, col, offset=0, dtype=mstype.int64): ``GPU`` ``CPU`` Examples: - >>> net = ops.tril_indices(4, 3, -1, mindspore.int64) - >>> output = net() + >>> output = ops.tril_indices(4, 3, -1, mindspore.int64) >>> print(output) [[1 2 2 3 3 3] [0 0 1 0 1 2]] @@ -5927,8 +5926,7 @@ def triu_indices(row, col, offset=0, dtype=mstype.int64): ``GPU`` ``CPU`` Examples: - >>> net = ops.triu_indices(5, 4, 2, mindspore.int64) - >>> output = net() + >>> output = ops.triu_indices(5, 4, 2, mindspore.int64) >>> print(output) [[0 0 1] [2 3 3]]