Converts a tensor() to an array() by stripping the index labels.
An index label order
needs to be provided so that the array's dim() order is well defined.
Usage
# S3 method for class 'tensor'
as.array(
x,
index_order = NULL,
...,
arg = "index_order",
call = rlang::caller_env()
)Arguments
- x
A labeled array ("tensor" object) created by
%_%ortensor().- index_order
An index specification created with
.(). The specification needs to match all the labels occurring inx. The label order determines the dimension order of the resulting array.- ...
Not used.
- arg, call
Used for error handling. Can be ignored by the user.
Value
The tensor components as usual array() object without any index labels
attached.