# Import statement
from hottbox.core import mode_n_product
mode_n_product
(tensor, matrix, mode)[source]¶Mode-n product of a N-dimensional array with a matrix.
N-dimensional array
2D array
Specifies mode along which a tensor is multiplied by a matrix. The size of a tensor along this mode
should be equal to the number of columns of the matrix. That is: tensor.shape[mode] = matrix.shape[1]
The result of the mode-n product of a tensor with a matrix along specified mode.
Notes
Result of mode-n product does not depend on the folding/unfolding convention, as long as folding and unfolding operations belong to the same convention.