# tensorplay.functional.select_scatter Source: https://www.tensorplay.cn/docs/generated/tensorplay.functional.select_scatter.html ```python tensorplay.functional.select_scatter(input, src, dim, index) → Tensor ``` Embeds the values of the src tensor into input at the given index. This function returns a tensor with fresh storage; it does not create a view. Parameters: - input ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – the input tensor. - src ([Tensor](/docs/generated/tensorplay.Tensor.html#tensorplay.Tensor)) – The tensor to embed into input - dim ([int](https://docs.python.org/3/builtins/functions.html#int)) – the dimension to insert the slice into. - index ([int](https://docs.python.org/3/builtins/functions.html#int)) – the index to select with > **Note** > > src must be of the proper size in order to be embedded into input. Specifically, it should have the same shape as tensorplay.select(input, dim, index) Example: ``` >>> a = tensorplay.zeros(2, 2) >>> b = tensorplay.ones(2) >>> a.select_scatter(b, 0, 0) tensor([[1., 1.], [0., 0.]]) ```