MCPcopy Index your code
hub / github.com/numpy/numpy / inner

Function inner

numpy/ma/core.py:8310–8324  ·  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

8308
8309
8310def inner(a, b):
8311 """
8312 Returns the inner product of a and b for arrays of floating point types.
8313
8314 Like the generic NumPy equivalent the product sum is over the last dimension
8315 of a and b. The first argument is not conjugated.
8316
8317 """
8318 fa = filled(a, 0)
8319 fb = filled(b, 0)
8320 if fa.ndim == 0:
8321 fa = fa.reshape((1,))
8322 if fb.ndim == 0:
8323 fb = fb.reshape((1,))
8324 return np.inner(fa, fb).view(MaskedArray)
8325
8326
8327inner.__doc__ = doc_note(np.inner.__doc__,

Calls 4

filledFunction · 0.85
reshapeMethod · 0.80
innerMethod · 0.80
viewMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…