Learn R Programming

KOFM (version 1.1.1)

ten_reshape: Tensor reshape

Description

Performing tensor reshape on a given tensor.

Usage

ten_reshape(ten, AA, time.mode = TRUE)

Value

An array representing a reshaped tensor.

Arguments

ten

An array representing a tensor.

AA

A vector representing mode indices to reshape along.

time.mode

Logical. TRUE if mode-1 of the input tensor is the time mode and hence not involved in reshape; otherwise reshape is on the entire input tensor. Default is TRUE.

Examples

Run this code
ten_reshape(array(1:24, dim=c(2,3,4)), c(2,3), FALSE);



Run the code above in your browser using DataLab