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)
| 8308 | |
| 8309 | |
| 8310 | def 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 | |
| 8327 | inner.__doc__ = doc_note(np.inner.__doc__, |
searching dependent graphs…