# Slice on the left side of the euqation in C++

Hey,

lets assume we have two arrays with identical size. In Python we can do something like:

``````array1[:, 5:8, :] = array2[:, 1:4, :]
``````

How would I transfer this to the C++ API?

``````auto right_side = array2.slice(/* dim */ 1, /* start */ 1, /* end */ 4);
``````

The right side is easy to implement, but is there a nice way of getting the left-side done as well similar to the python code?

use `copy_`:

``````auto left_side = array1.slice(...);
auto right_side = array2.slice(...);
left_side.copy_(right_side)
``````