mindspore.ops.fill ================== .. 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/ops/mindspore.ops.func_fill.rst :alt: 查看源文件 .. py:function:: mindspore.ops.fill(type, shape, value) 创建tensor,用指定值填充。 参数: - **type** (mindspore.dtype) - 指定数据类型。 - **shape** (Union(Tensor, tuple[int])) - 指定的shape。 - **value** (Union(Tensor, number.Number, bool)) - 指定值。 返回: Tensor