Unfold (matricize) a tensor along a mode

unfold(x, mode)

# S4 method for dtensor,numeric
unfold(x, mode)

# S4 method for sptensor,numeric
unfold(x, mode)

Arguments

x

tensor

mode

dimension to unfold along