tensorly.prod

prod(tensor, axis=None)

Compute the product of a tensor, optionally along an axis.

Parameters

tensor : tensor

axis : int, optional

If provided, the product is computed along this axis.

Returns

out : scalar or tensor