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

16 lines
590 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.copy
=================================
.. py:function:: mindspore.numpy.copy(a)
返回给定对象的Tensor副本。
参数:
- **a** (Union[int, float, bool, list, tuple, Tensor]) - 可以转换为Tensor的任何形式的输入数据。 包含 ``int, float, bool, Tensor, list, tuple``
返回:
Tensor有与 ``a`` 相同的数据。
异常:
- **TypeError** - 如果没有按照上述内容给定的数据类型输入参数。
- **ValueError** - 如果输入 ``a`` 在不同的维度上具有不同的大小。