[−][src]Trait math::tensor::ShapableData
The implementer provides an interface for the underlying data and shape.
Required methods
fn data(&self) -> &Vec<Dtype>
Returns the underlying data.
fn shape(&self) -> &TensorShape
Returns the shape associated with the data.
fn shape_mut(&mut self) -> &mut TensorShape
Returns a mutable shape associated with the data.
Provided methods
fn t(&self) -> EphemeralView<Dtype>
Reverses the axes.
fn transpose(&self, axes: Vec<usize>) -> EphemeralView<Dtype>
Arguments
axes
- Must be the same length asself.shape().ndim()
. For eachi
,axes[i] = j
means that the originalj
-th axis will be at thei
-th axis in the new shape.
Implementors
impl<'a, Dtype> ShapableData<Dtype> for EphemeralView<'a, Dtype>
[src]
An EphemeralView 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]
impl<Dtype> ShapableData<Dtype> for Tensor<Dtype>
[src]
A Tensor provides an interface for the underlying data and shape.