Skip to main content

IntoShape

Trait IntoShape 

Source
pub trait IntoShape: Sealed { }
Expand description

A shape argument: [2, 3] (of i32 or usize), a slice, a vector, a reference to any of these, or () for a 0-D array. Every dimension must be in 0..=i32::MAX; reshape also accepts one -1 (inferred). Anything else makes the operation fail with crate::OpErrorKind::InvalidShape.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl IntoShape for ()

Source§

impl IntoShape for Vec<i32>

Source§

impl IntoShape for Vec<usize>

Source§

impl IntoShape for [i32]

Source§

impl IntoShape for [usize]

Source§

impl<T: IntoShape + ?Sized> IntoShape for &T

Source§

impl<const N: usize> IntoShape for [i32; N]

Source§

impl<const N: usize> IntoShape for [usize; N]

Implementors§