Skip to content

Commit

Permalink
Added docs for dot between arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
Evey Dee committed Jun 16, 2017
1 parent e31cb19 commit 0ead524
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion base/linalg/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ dot(x::AbstractArray, y::AbstractArray) = ctranspose(x) * y
dot(x, y)
⋅(x,y)
Compute the dot product. For complex vectors, the first vector is conjugated.
Compute the dot product. For complex vectors, the first vector is conjugated. If the first argument is a matrix, it is conjugate transposed instead. Note: if both arguments are vectors, `dot` is called recursively between its inner elements (see `vecdot`).
# Example
Expand All @@ -692,6 +692,11 @@ julia> dot([1; 1], [2; 3])
julia> dot([im; im], [1; 1])
0 - 2im
julia> dot([im 0; 0 im], [1; 1])
2-element Array{Complex{Int64},1}:
0-1im
0-1im
```
"""
dot(x::AbstractVector, y::AbstractVector) = vecdot(x, y)
Expand Down

0 comments on commit 0ead524

Please sign in to comment.