as.Tensor {TensorTools} | R Documentation |
Converts an array to an S3 tensor
Description
This will converts array to S3 object tensor. Vectors and matrices must first be converted to an array before applying as.Tensor.
Usage
as.Tensor(t)
Arguments
t |
Numeric, array of numbers |
Value
S3 class tensor
Author(s)
Kyle Caudle
Randy Hoover
Jackson Cates
Everett Sandbo
Examples
indices <- c(2,3,4)
arr <- array(runif(prod(indices)), dim = indices)
arrT <- as.Tensor(arr); arrT
[Package TensorTools version 1.0.0 Index]