@@ -842,20 +842,22 @@ def dot(a, b, out=None):
842
842
843
843
@array_function_from_c_func_and_dispatcher (_multiarray_umath .vdot )
844
844
def vdot (a , b ):
845
- """
845
+ r """
846
846
vdot(a, b, /)
847
847
848
848
Return the dot product of two vectors.
849
849
850
- The vdot(`a`, `b`) function handles complex numbers differently than
851
- dot(`a`, `b`). If the first argument is complex the complex conjugate
852
- of the first argument is used for the calculation of the dot product.
850
+ The `vdot` function handles complex numbers differently than `dot`:
851
+ if the first argument is complex, it is replaced by its complex conjugate
852
+ in the dot product calculation. `vdot` also handles multidimensional
853
+ arrays differently than `dot`: it does not perform a matrix product, but
854
+ flattens the arguments to 1-D arrays before taking a vector dot product.
853
855
854
- Note that `vdot` handles multidimensional arrays differently than `dot`:
855
- it does not perform a matrix product, but flattens input arguments to 1-D vectors first.
856
- The runtime of this function is linear in `a.size` and `b.size`. When `(a, b)` are 2-D arrays
857
- of the same shape, this function returns their `Frobenius inner- product` (also known as the
858
- *trace inner product* or the *standard inner product* on a vector space of matrices).
856
+ Consequently, when the arguments are 2-D arrays of the same shape, this
857
+ function effectively returns their
858
+ `Frobenius inner product <https://en.wikipedia.org/wiki/Frobenius_inner_product>`_.
859
+ (also known as the *trace inner product* or the *standard inner product*
860
+ on a vector space of matrices).
859
861
860
862
Parameters
861
863
----------
@@ -896,7 +898,7 @@ def vdot(a, b):
896
898
>>> 1*4 + 4*1 + 5*2 + 6*2
897
899
30
898
900
899
- """
901
+ """ # noqa: E501
900
902
return (a , b )
901
903
902
904
0 commit comments