tensorly.prod

prod(tensor, axis=None)

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

Parameters
tensortensor
axisint, optional

If provided, the product is computed along this axis.

Returns
outscalar or tensor