mindspore/docs/api/api_python/numpy/mindspore.numpy.ravel.rst

16 lines
442 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.numpy.ravel
=================================
.. py:function:: mindspore.numpy.ravel(x)
返回一个连续的展平Tensor。
返回一个一维Tensor包含输入Tensor的所有元素。
参数:
- **x** (Tensor) - 需要展平的Tensor。
返回:
展平后的Tensor与原始Tensor ``x`` 具有相同的数据类型。
异常:
- **TypeError** - 如果 ``x`` 不是Tensor。