super_diag_tensor

# Import statement

from hottbox.utils.generation import super_diag_tensor
super_diag_tensor(shape, values=None)[source]

Super-diagonal tensor of the specified order.

Parameters
shapetuple

Desired shape of the tensor. len(shape) defines the order of the tensor, whereas its values specify sizes of dimensions of the tensor.

valuesnp.ndarray

Array of values on the super-diagonal of a tensor. By default contains only ones. Length of this vector defines Kryskal rank which is equal to shape[0].

Returns
tensorTensor