修改mindspore.ops.function.array_func.eye中的示例代码,示例中应传入参数dtype, 而不是t。

This commit is contained in:
tangdezhi_123 2023-03-01 20:28:06 +08:00
parent ed363cde09
commit ad7ad55eb8
1 changed files with 1 additions and 1 deletions

View File

@ -324,7 +324,7 @@ def eye(n, m=None, dtype=None):
[[1. 0.]] [[1. 0.]]
>>> print(output.dtype) >>> print(output.dtype)
Float64 Float64
>>> output = ops.eye(2, t=mindspore.int32) >>> output = ops.eye(2, dtype=mindspore.int32)
>>> print(output) >>> print(output)
[[1 0] [[1 0]
[0 1]] [0 1]]