Mojo function
inner_product
inner_product(a: IntTuple, b: IntTuple) -> Int
Compute the inner product of two IntTuples.
For flat tuples, this is the sum of element-wise products. For nested tuples, the function recurses into corresponding nested elements.
Note: If the input tuples have different lengths, assertion fails.
Args:
Returns:
Int: The inner product as an Int.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!