Skip to main content

slice

Function slice 

Source
pub fn slice(tensor: HostTensor, slices: &[Slice]) -> HostTensor
Expand description

Slice a tensor according to the given slice parameters.

For positive steps, this is zero-copy (metadata only). For negative steps, data is copied to handle the reversal.