Skip to content

Commit

Permalink
bugfix: properly import Base.cis into LinearAlgebra (JuliaLang#42164)
Browse files Browse the repository at this point in the history
Certain methods, e.g.,
`cis(::Union{RealHermSymComplexHerm,SymTridiagonal{<:Real}})`,
were not imported properly.
  • Loading branch information
olof3 committed Sep 10, 2021
1 parent 77572bc commit c4f0d8b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion stdlib/LinearAlgebra/src/LinearAlgebra.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module LinearAlgebra

import Base: \, /, *, ^, +, -, ==
import Base: USE_BLAS64, abs, acos, acosh, acot, acoth, acsc, acsch, adjoint, asec, asech,
asin, asinh, atan, atanh, axes, big, broadcast, ceil, conj, convert, copy, copyto!, cos,
asin, asinh, atan, atanh, axes, big, broadcast, ceil, cis, conj, convert, copy, copyto!, cos,
cosh, cot, coth, csc, csch, eltype, exp, fill!, floor, getindex, hcat,
getproperty, imag, inv, isapprox, isequal, isone, iszero, IndexStyle, kron, kron!, length, log, map, ndims,
oneunit, parent, power_by_squaring, print_matrix, promote_rule, real, round, sec, sech,
Expand Down
4 changes: 2 additions & 2 deletions stdlib/LinearAlgebra/src/dense.jl
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ julia> cis([π 0; 0 π]) ≈ -I
true
```
"""
Base.cis(A::AbstractMatrix) = exp(im * A) # fallback
Base.cis(A::AbstractMatrix{<:Base.HWNumber}) = exp_maybe_inplace(float.(im .* A))
cis(A::AbstractMatrix) = exp(im * A) # fallback
cis(A::AbstractMatrix{<:Base.HWNumber}) = exp_maybe_inplace(float.(im .* A))

exp_maybe_inplace(A::StridedMatrix{<:Union{ComplexF32, ComplexF64}}) = exp!(A)
exp_maybe_inplace(A) = exp(A)
Expand Down

0 comments on commit c4f0d8b

Please sign in to comment.