Skip to main content

Unsqueeze

Trait Unsqueeze 

Source
pub trait Unsqueeze {
    type Output;

    // Required method
    fn unsqueeze(self, dim: i32) -> Self::Output;

    // Provided method
    fn _apply(self, dim: i32) -> Self::Output
       where Self: Sized { ... }
}
Expand description

trait to represent the operation

Required Associated Types§

Source

type Output

the output type

Required Methods§

Source

fn unsqueeze(self, dim: i32) -> Self::Output

computes the operation

Provided Methods§

Source

fn _apply(self, dim: i32) -> Self::Output
where Self: Sized,

macro convenience version of the primary method

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Unsqueeze for f32

Source§

impl<T: Unsqueeze> Unsqueeze for Vec<T>
where T::Output: Into<Vec<T>>, Vec<T>: Rank,

Source§

type Output = Vec<Vec<T>>

Source§

fn unsqueeze(self, dim: i32) -> Self::Output

Implementors§