Construct a dtensor from a multi-dimensional array.

dtensor(x)

# S4 method for array
dtensor(x)

# S4 method for numeric
dtensor(x)

Arguments

x

n-dimensional R array

See also

dtensor-class for class documentation.

Examples

# A 2x2x2 dense tensor arr <- array(data = c(1,0,0,0,1,0,0,0) , dim = c(2,2,2)) X <- dtensor(arr)