Skip to main content

resize

Function resize 

Source
pub fn resize<T, D>(
    a: &Array<T, D>,
    new_shape: &[usize],
) -> Result<Array<T, IxDyn>, FerrayError>
where T: Element, D: Dimension,
Expand description

Resize an array to a new shape.

If the new size is larger, the array is filled by repeating its elements. If smaller, the array is truncated.

Analogous to numpy.resize().