mindspore/docs/api/api_python/numpy/mindspore.numpy.broadcast_t...

16 lines
441 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.broadcast_to
=================================
.. py:function:: mindspore.numpy.broadcast_to(array, shape)
将数组广播到新shape。
参数:
- **array** (Tensor) - 要广播的数组。
- **shape** (tuple) - 目标数组的shape。
返回:
Tensor原始数组被广播到指定的shape。
异常:
- **ValueError** - 如果数组不能被广播到指定shape。