slice_array

Extracts a slice from an array.

Inputs

array

The array to slice.

start

Index of the first element to extract. This will be adjusted to be inside the range of the input array.

stop

Index of the first element past the end of the slice. This is also adjusted to fit the original array bounds.

stride

Index increment between each element in the original array. This can be negative.

For example, slice_array(a, array_size(a), -1, -1) can be used to safely reverse an array.

Output

slice

The array slice.