Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions stdlib/LinearAlgebra/src/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -903,6 +903,9 @@ function dot(x, y) # arbitrary iterables
end

dot(x::Number, y::Number) = conj(x) * y
dot(::Number, ::Missing) = missing
dot(::Missing, ::Number) = missing
dot(::Missing, ::Missing) = missing

function dot(x::AbstractArray, y::AbstractArray)
lx = length(x)
Expand Down
8 changes: 8 additions & 0 deletions stdlib/LinearAlgebra/test/generic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,14 @@ end
end
end

@testset "dot with missing" begin
x = [5, 6, missing]
y = [missing, 5, 6]
@test ismissing(dot(x, x))
@test ismissing(dot(x, y))
@test ismissing(dot(y, x))
end

@testset "condskeel #34512" begin
A = rand(3, 3)
@test condskeel(A) ≈ condskeel(A, [8,8,8])
Expand Down