MCPcopy Create free account
hub / github.com/numpy/numpy / inner

Function inner

numpy/ma/core.py:7925–7939  ·  view source on GitHub ↗

Returns the inner product of a and b for arrays of floating point types. Like the generic NumPy equivalent the product sum is over the last dimension of a and b. The first argument is not conjugated.

(a, b)

Source from the content-addressed store, hash-verified

7923
7924
7925def inner(a, b):
7926 """
7927 Returns the inner product of a and b for arrays of floating point types.
7928
7929 Like the generic NumPy equivalent the product sum is over the last dimension
7930 of a and b. The first argument is not conjugated.
7931
7932 """
7933 fa = filled(a, 0)
7934 fb = filled(b, 0)
7935 if fa.ndim == 0:
7936 fa.shape = (1,)
7937 if fb.ndim == 0:
7938 fb.shape = (1,)
7939 return np.inner(fa, fb).view(MaskedArray)
7940inner.__doc__ = doc_note(np.inner.__doc__,
7941 "Masked values are replaced by 0.")
7942innerproduct = inner

Calls 2

filledFunction · 0.85
viewMethod · 0.45