Skip to main content

repeat

Function repeat 

Source
pub fn repeat<T: Element, D: Dimension>(
    a: &Array<T, D>,
    repeats: usize,
    axis: Option<usize>,
) -> FerrayResult<Array<T, IxDyn>>
Expand description

Repeat elements of an array.

If axis is None, the array is flattened first, then each element is repeated repeats times.

Analogous to numpy.repeat().

ยงErrors

Returns FerrayError::AxisOutOfBounds if the axis is out of bounds.