For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo function
variance
def variance(src: TileTensor[Engine=src.Engine, address_space=src.address_space, linear_idx_type=src.linear_idx_type], correction: Int = Int(1)) -> Scalar[src.dtype]
Computes the variance value of the elements in a buffer.
variance(x) = sum((x - E(x))^2) / (size - correction)Args:
- src (
TileTensor[Engine=src.Engine, address_space=src.address_space, linear_idx_type=src.linear_idx_type]): The buffer. - correction (
Int): Normalize variance by size - correction (Default=1).
Returns:
Scalar[src.dtype]: The variance value of the elements in a buffer.
Raises:
May raise on GPU targets when a device error occurs.