tensorly.base.tensor_to_vec

tensor_to_vec(tensor)[source]

Vectorises a tensor

Parameters:

tensor : ndarray

tensor of shape (i_1, ..., i_n)

Returns:

1D-array

vectorised tensor of shape (i_1 * i_2 * ... * i_n)