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

21 lines
693 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.real
====================
.. py:function:: mindspore.mint.real(input) -> Tensor
返回一个新tensor包含输入tensor的实部。如果输入tensor是实数则返回输入tensor不变。
返回的tensor和输入tensor共享相同的底层存储。
.. note::
仅支持Pynative模式。
参数:
- **input** (Tensor) - 输入tensor。
返回:
Tensor输出shape与 `input` 相同。如果输入为complex64则输出为float32如果输入为complex128则输出为float64。
其他情况,输出与输入类型相同。
异常:
- **ValueError** - 如果输入tensor没有存储信息。