[−][src]Struct math::tensor::Tensor
An N-dimensional Tensor
Examples
use math::tensor::{IntoTensor, ShapableData}; let tensor = vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12].into_tensor([3, 4]); assert_eq!(tensor.shape().ndim(), 2); assert_eq!(tensor.shape().dims(), vec![3, 4]);
Trait Implementations
impl<Dtype: Clone> Clone for Tensor<Dtype>
[src]
impl<Dtype: Debug> Debug for Tensor<Dtype>
[src]
impl<Dtype: Eq> Eq for Tensor<Dtype>
[src]
impl<'a, Dtype> From<&'a Tensor<Dtype>> for EphemeralView<'a, Dtype>
[src]
A Tensor can be viewed as an EphemeralView with the same shape.
impl<Dtype: PartialEq> PartialEq<Tensor<Dtype>> for Tensor<Dtype>
[src]
impl<Dtype> ShapableData<Dtype> for Tensor<Dtype>
[src]
A Tensor provides an interface for the underlying data and shape.
fn data(&self) -> &Vec<Dtype>
[src]
fn shape(&self) -> &TensorShape
[src]
fn shape_mut(&mut self) -> &mut TensorShape
[src]
fn t(&self) -> EphemeralView<'_, Dtype>
[src]
fn transpose(&self, axes: Vec<usize>) -> EphemeralView<'_, Dtype>
[src]
impl<Dtype> StructuralEq for Tensor<Dtype>
[src]
impl<Dtype> StructuralPartialEq for Tensor<Dtype>
[src]
impl<'a, Dtype> ToView<'a, Dtype> for Tensor<Dtype>
[src]
fn as_shape<S: Into<TensorShape>>(
&'a self,
shape: S
) -> EphemeralView<'a, Dtype>
[src]
&'a self,
shape: S
) -> EphemeralView<'a, Dtype>
Auto Trait Implementations
impl<Dtype> RefUnwindSafe for Tensor<Dtype> where
Dtype: RefUnwindSafe,
Dtype: RefUnwindSafe,
impl<Dtype> Send for Tensor<Dtype> where
Dtype: Send,
Dtype: Send,
impl<Dtype> Sync for Tensor<Dtype> where
Dtype: Sync,
Dtype: Sync,
impl<Dtype> Unpin for Tensor<Dtype> where
Dtype: Unpin,
Dtype: Unpin,
impl<Dtype> UnwindSafe for Tensor<Dtype> where
Dtype: UnwindSafe,
Dtype: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,