Skip to content

Commit

Permalink
Merge pull request #13 from putianyi889/version-0.0.4.1
Browse files Browse the repository at this point in the history
support LinearAlgebra.AbstractQ
  • Loading branch information
putianyi889 authored Mar 16, 2024
2 parents bf1201d + 882842a commit 9df643f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@ uuid = "583f92f5-06d6-4306-8236-316410defc98"
authors = ["Tianyi Pu <[email protected]> and contributors"]
version = "0.0.4"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

[compat]
Aqua = "0.8"
Documenter = "0.27, 1"
LinearAlgebra = "0, 1"
Test = "1"
julia = "1"

Expand Down
4 changes: 4 additions & 0 deletions src/EltypeExtensions.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module EltypeExtensions

import Base: convert
import LinearAlgebra: AbstractQ # to support 1.0, not using package extensions

export elconvert, basetype, baseconvert, precisiontype, precisionconvert

Expand Down Expand Up @@ -28,6 +29,9 @@ elconvert(::Type{T}, A::AbstractArray) where T = AbstractArray{T}(A)
elconvert(::Type{T}, A::AbstractRange) where T = T(first(A)):T(step(A)):T(last(A))
elconvert(::Type{T}, A::AbstractUnitRange) where T<:Integer = AbstractUnitRange{T}(A)
elconvert(::Type{T}, A::AbstractSet) where T = AbstractSet{T}(A)
if !(AbstractQ <: AbstractMatrix) # see https://github.com/JuliaLang/julia/pull/46196
elconvert(::Type{T}, A::AbstractQ) where T = convert(AbstractQ{T}, A)
end

"""
_to_eltype(T, S)
Expand Down

0 comments on commit 9df643f

Please sign in to comment.