mindspore2022/docs/api/api_python/ops/mindspore.ops.ScalarToArray...

18 lines
409 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.ScalarToArray
=============================
.. py:class:: mindspore.ops.ScalarToArray
将Scalar转换为 `Tensor`
**输入:**
- **input_x** (Union[int, float]) - ScalarToArray的输入是Scalar且只能是常量值。
**输出:**
Tensor0维Tensor其值和输入一致。
**异常:**
- **TypeError** - `input_x` 既不是int也不是float。