forked from mindspore-Ecosystem/mindspore
修改mindspore.ops.function.array_func.eye中的示例代码,示例中应传入参数dtype, 而不是t。
This commit is contained in:
parent
ed363cde09
commit
ad7ad55eb8
|
@ -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]]
|
||||||
|
|
Loading…
Reference in New Issue