# Import statement
from hottbox.utils.generation import sparse_tensor
sparse_tensor
(shape, distr='uniform', distr_type=0, fxdind=None, pct=0.05)[source]¶Generates a sparse tensor of any dimension and fills it accordingly
Specifies the dimensions of the tensor
Specifies the random generation using a class of the numpy.random module
Number of indices to not fix. 0 will be applied globally, 1 will apply to fibers, 2 to slices, etc.
Percentage of the dataset to be filled
Generated tensor according to the parameters specified