tensorly.mean

mean(tensor, axis=None)

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

Parameters:

tensor : tensor

axis : int, optional

If provided, the mean is computed along this axis.

Returns:

out : scalar or tensor