Trait IntoTensor

Source
pub trait IntoTensor<B: Backend> {
    // Required method
    fn into_tensor(self, backend: B) -> Tensor<B>;
}
Expand description

Objects must implement this to be convertible into tensor

Required Methods§

Source

fn into_tensor(self, backend: B) -> Tensor<B>

Convert self into tensor

Implementations on Foreign Types§

Source§

impl<B: Backend, T: Scalar> IntoTensor<B> for &'static [T]

Source§

fn into_tensor(self, backend: B) -> Tensor<B>

Source§

impl<B: Backend, T: Scalar> IntoTensor<B> for Vec<T>

Source§

fn into_tensor(self, backend: B) -> Tensor<B>

Source§

impl<B: Backend, T: Scalar> IntoTensor<B> for Range<T>
where Range<T>: Iterator<Item = T> + ExactSizeIterator,

Source§

fn into_tensor(self, backend: B) -> Tensor<B>

Source§

impl<B: Backend, T: Scalar, const D0: usize> IntoTensor<B> for [T; D0]

Source§

fn into_tensor(self, backend: B) -> Tensor<B>

Source§

impl<B: Backend, T: Scalar, const D0: usize, const D1: usize> IntoTensor<B> for [[T; D1]; D0]

Source§

fn into_tensor(self, backend: B) -> Tensor<B>

Source§

impl<B: Backend, T: Scalar, const D0: usize, const D1: usize, const D2: usize> IntoTensor<B> for [[[T; D2]; D1]; D0]

Source§

fn into_tensor(self, backend: B) -> Tensor<B>

Implementors§

Source§

impl<B: Backend> IntoTensor<B> for &Tensor<B>

Source§

impl<B: Backend> IntoTensor<B> for Tensor<B>

Source§

impl<B: Backend, T: Scalar> IntoTensor<B> for T