Skip to main content

transpose

Function transpose 

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

Permute the axes of an array.

axes specifies the new ordering. For a 2-D array, [1, 0] transposes. If axes is None, reverses the order of all axes.

Analogous to numpy.transpose().

§Errors

Returns FerrayError::InvalidValue if axes is the wrong length or contains invalid/duplicate axis indices.