Skip to main content

repeat

Function repeat 

Source
pub fn repeat<T, D>(
    a: &Array<T, D>,
    repeats: usize,
    axis: Option<usize>,
) -> Result<Array<T, IxDyn>, FerrayError>
where T: Element, D: Dimension,
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.