tensor
Tensor2
Class for the 2nd-order tensor (3, 3) representation.
__add__
Add a tensor/scalar to the tensor.
__init__
Initialize the tensor.
Warnings
- Please ensure that the input matrix is symmetric, as the tensor is expected to be symmetric.
| PARAMETER | DESCRIPTION |
|---|---|
data
|
The data of the tensor. A 2D array with shape (3, 3).
TYPE:
|
__matmul__
Multiply the tensor by another tensor.
__mul__
Multiply a tensor/scalar to the tensor.
__rmul__
Multiply the tensor by a tensor/scalar.
__rsub__
Subtract the tensor from a tensor/scalar.
__sub__
Subtract a tensor/scalar from the tensor.
tensorFromVector
tensorFromVector(vec: ndarray) -> Tensor2
Create a tensor from a vector.
| PARAMETER | DESCRIPTION |
|---|---|
vec
|
The data of the tensor in a vector. A 1D array with shape (6,).
TYPE:
|