pub trait TensorCast {
    type Cast;

    // Required method
    fn cast_into(self, dtype: NumberType) -> TCResult<Self::Cast>;
}
Expand description

Method to cast a tensor into a different data type

Required Associated Types§

Required Methods§

source

fn cast_into(self, dtype: NumberType) -> TCResult<Self::Cast>

Cast this tensor into the given dtype.

Implementors§

source§

impl<Txn, FE> TensorCast for DenseView<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + Clone,

§

type Cast = DenseView<Txn, FE>

source§

impl<Txn, FE> TensorCast for Tensor<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node> + Clone,

§

type Cast = Tensor<Txn, FE>

source§

impl<Txn, FE> TensorCast for SparseView<Txn, FE>
where Txn: Transaction<FE>, FE: DenseCacheFile + AsType<Node>,

§

type Cast = SparseView<Txn, FE>