tensorly.reshape

reshape(tensor, newshape)

Gives a new shape to a tensor without changing its data.

Parameters
tensortl.tensor
newshapeint or tuple of ints

The new shape should be compatible with the original shape. If an integer, then the result will be a 1-D tensor of that length.

Returns
tensor