[−][src]Trait math::tensor::ShapableData
The implementer provides an interface for the underlying data and shape.
Required methods
pub fn data(&self) -> &Vec<Dtype>
[src]
Returns the underlying data.
pub fn shape(&self) -> &TensorShape
[src]
Returns the shape associated with the data.
pub fn shape_mut(&mut self) -> &mut TensorShape
[src]
Returns a mutable shape associated with the data.
Provided methods
pub fn t(&self) -> EphemeralView<'_, Dtype>
[src]
Reverses the axes.
pub fn transpose(&self, axes: Vec<AxisIndex>) -> EphemeralView<'_, Dtype>
[src]
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.
pub fn data(&self) -> &Vec<Dtype>
[src]
pub fn shape(&self) -> &TensorShape
[src]
pub 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.