Expand description
Creation methods for Tensor struct.
This module relates to the Python array API standard v2024.12.
Todo list:
Macros§
- impl_
from_ 🔒nested_ array - Implementation of this macro uses the same way of crate
ndarray: https://docs.rs/ndarray/latest/ndarray/macro.array.html
Traits§
- ArangeAPI
- EmptyAPI
- Empty
LikeAPI - EyeAPI
- From
Nested ArrayAPI - FullAPI
- Full
LikeAPI - LinspaceAPI
- OnesAPI
- Ones
LikeAPI - TrilAPI
- TriuAPI
- UninitAPI
- ZerosAPI
- Zeros
LikeAPI
Functions§
- arange
- Evenly spaced values within the half-open interval
[start, stop)as one-dimensional array. - arange_
f - assume_
init ⚠ - Converts a tensor with uninitialized values into a tensor with initialized values.
- assume_
init_ ⚠f - Converts a tensor with uninitialized values into a tensor with initialized values.
- empty⚠
- Uninitialized tensor having a specified shape.
- empty_f⚠
- Safety
- empty_
like ⚠ - Uninitialized tensor with the same shape as an input tensor.
- empty_
like_ ⚠f - Safety
- eye
- Returns a two-dimensional array with ones on the kth diagonal and zeros elsewhere.
- eye_f
- full
- New tensor having a specified shape and filled with given value.
- full_f
- full_
like - New tensor filled with given value and having the same shape as an input tensor.
- full_
like_ f - linspace
- Evenly spaced numbers over a specified interval.
- linspace_
f - ones
- New tensor filled with ones and having a specified shape.
- ones_f
- ones_
like - New tensor filled with ones and having the same shape as an input tensor.
- ones_
like_ f - tril
- Returns the lower triangular part of a matrix (or a stack of matrices) x.
- tril_f
- triu
- Returns the upper triangular part of a matrix (or a stack of matrices) x.
- triu_f
- uninit
- New tensor filled with uninitialized values and having a specified shape.
- uninit_
f - zeros
- New tensor filled with zeros and having a specified shape.
- zeros_f
- zeros_
like - New tensor filled with zeros and having the same shape as an input tensor.
- zeros_
like_ f