tensorly.base.partial_tensor_to_vec

partial_tensor_to_vec(tensor, skip_begin=1, skip_end=0)[source]

Partially vectorises a tensor

Partially vectorises a tensor while ignoring the specified dimension at the beginning and the end

Parameters
tensorndarray

tensor to partially vectorise

skip_beginint, optional, default is 1

number of dimensions to leave untouched at the beginning

skip_endint, optional

number of dimensions to leave untouched at the end

Returns
ndarray

partially vectorised tensor with the skip_begin first and skip_end last dimensions untouched