super_diagonal_tensor

# Import statement

from hottbox.utils.generation import super_diagonal_tensor
super_diagonal_tensor(shape, distr='ones', values=None)[source]

Generates a tensor of any dimension with random or specified numbers across the super-diagonal and zeros elsewhere

Parameters
shapetuple

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

distrstr, optional

Specifies the random generation using a class of the numpy.random module

valueslist

Array of values on the super-diagonal of a tensor

Returns
Tensor

Generated tensor according to the parameters specified