mindspore/docs/api/api_python/mint/mindspore.mint.func_imag.rst

22 lines
775 B
ReStructuredText
Raw Permalink 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.mint.imag
====================
.. py:function:: mindspore.mint.imag(input) -> Tensor
返回一个新tensor包含输入tensor的虚部。
返回的tensor和输入tensor共享相同的底层存储。
.. note::
- 仅支持Pynative模式。
- 仅支持complex64和complex128类型的tensor。
参数:
- **input** (Tensor) - 输入tensor。数据类型只支持complex64和complex128。
返回:
Tensor输出shape与 `input` 相同。如果输入为complex64则输出为float32如果输入为complex128则输出为float64。
异常:
- **TypeError** - 如果 `input` 的数据类型不是complex64或complex128。
- **ValueError** - 如果输入tensor没有存储信息。