tensorly.base.partial_vec_to_tensor

partial_vec_to_tensor(matrix, shape, skip_begin=1, skip_end=0)[source]

Refolds a partially vectorised tensor into a full one

Parameters:
matrixndarray

a partially vectorised tensor

shapetuple

the shape of the original full tensor (including skipped dimensions)

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

full tensor