Skip to content

rdiv!(randn(4,4), I(4)) fails #849

Closed
JuliaLang/julia
#40942
@olof3

Description

@olof3
julia> rdiv!(randn(4,4), I(4))
ERROR: MethodError: no method matching rdiv!(::Matrix{Float64}, ::Diagonal{Bool, Vector{Bool}})

There is an rdiv! method but it requires the arguments to have the same eltype, i.e.,
rdiv!(randn(4,4), 1.0I(4)) works

I also noticed that there are two ldiv! methods for Diagonal and Matrix. ldiv!(D::Diagonal, B::StridedVecOrMat) and
ldiv!(D::Diagonal{T}, V::AbstractMatrix{T}). This seems redundant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions