mindspore.numpy.broadcast_to ================================= .. image:: https://mindspore-website.obs.cn-north-4.myhuaweicloud.com/website-images/br_base/resource/_static/logo_source.svg :target: https://gitee.com/mindspore/mindspore/blob/br_base/docs/api/api_python/numpy/mindspore.numpy.broadcast_to.rst :alt: 查看源文件 .. py:function:: mindspore.numpy.broadcast_to(array, shape) 将数组广播到新shape。 参数: - **array** (Tensor) - 要广播的数组。 - **shape** (tuple) - 目标数组的shape。 返回: Tensor,原始数组被广播到指定的shape。 异常: - **ValueError** - 如果数组不能被广播到指定shape。