mindspore.ops.index_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_index_fill.rst :alt: 查看源文件 .. py:function:: mindspore.ops.index_fill(x, axis, index, value) 按照指定轴和索引用输入 `value` 填充输入 `x` 的元素。 参数: - **x** (Tensor) - 输入tensor。 - **axis** (Union[int, Tensor]) - 指定轴。 - **index** (Tensor) - 指定索引。 - **value** (Union[bool, int, float, Tensor]) - 填充输入tensor的值。 返回: Tensor