dot_inplace_left¶
-
menpo.math.dot_inplace_left(a, b, block_size=1000)[source]¶ Inplace dot product for memory efficiency. It computes
a * b = c, whereawill be replaced inplace withc.- Parameters
a (
(n_big, k)ndarray) – First array to dot - assumed to be large. Will be damaged by this function call as it is used to store the output inplace.b (
(k, n_small)ndarray,n_small <= k) – The second array to dot - assumed to be small.n_smallmust be smaller thankso the result can be stored within the memory space ofa.block_size (int, optional) – The size of the block of
athat will be dotted againstbin each iteration. larger block sizes increase the time performance of the dot product at the cost of a higher memory overhead for the operation.
- Returns
c (
(n_big, n_small)ndarray) – The output of the operation. Exactly the same as a memory view ontoa(a[:, :n_small]) asais modified inplace to store the result.