diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdd2046b..8339456c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -32,12 +32,13 @@ jobs: test: needs: pre_job if: needs.pre_job.outputs.should_skip != 'true' - name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} + name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ github.event_name }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: version: + - 'min' - 'lts' - '1' - 'pre' @@ -45,14 +46,11 @@ jobs: - ubuntu-latest - macOS-latest - windows-latest - arch: - - x64 steps: - uses: actions/checkout@v4 - uses: julia-actions/setup-julia@v2 with: version: ${{ matrix.version }} - arch: ${{ matrix.arch }} - uses: julia-actions/cache@v2 - uses: julia-actions/julia-buildpkg@v1 - uses: julia-actions/julia-runtest@v1 diff --git a/Project.toml b/Project.toml index d0d3e609..17c28a38 100644 --- a/Project.toml +++ b/Project.toml @@ -1,12 +1,9 @@ name = "FillArrays" uuid = "1a297f60-69ca-5386-bcde-b61e274b549b" -version = "1.14.0" +version = "1.15.0" [deps] LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" -PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" -SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf" -Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" [weakdeps] PDMats = "90014a1f-27ba-587c-ab20-58faa44d9150" @@ -22,16 +19,16 @@ FillArraysStatisticsExt = "Statistics" Aqua = "0.8" Documenter = "1" Infinities = "0.1" -LinearAlgebra = "1.6" +LinearAlgebra = "1" PDMats = "0.11.17" Quaternions = "0.7" -Random = "1.6" +Random = "1" ReverseDiff = "1" -SparseArrays = "1.6" +SparseArrays = "1" StaticArrays = "1" -Statistics = "1.6" -Test = "1.6" -julia = "1.6" +Statistics = "1" +Test = "1" +julia = "1.10" [extras] Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" diff --git a/ext/FillArraysSparseArraysExt.jl b/ext/FillArraysSparseArraysExt.jl index 6021296b..4cb29dcd 100644 --- a/ext/FillArraysSparseArraysExt.jl +++ b/ext/FillArraysSparseArraysExt.jl @@ -61,11 +61,6 @@ end @deprecate kron(E1::RectDiagonalFill, E2::RectDiagonalFill) kron(sparse(E1), sparse(E2)) # Ambiguity. see #178 -if VERSION >= v"1.8" - dot(x::AbstractFillVector, y::SparseVectorUnion) = _fill_dot(x, y) -else - dot(x::AbstractFillVector{<:Number}, y::SparseVectorUnion{<:Number}) = _fill_dot(x, y) -end - +dot(x::AbstractFillVector, y::SparseVectorUnion) = _fill_dot(x, y) end # module diff --git a/src/FillArrays.jl b/src/FillArrays.jl index 66dad480..d1c29a45 100644 --- a/src/FillArrays.jl +++ b/src/FillArrays.jl @@ -72,18 +72,10 @@ ishermitian(F::AbstractFillMatrix) = axes(F,1) == axes(F,2) && (isempty(F) || is Base.IteratorSize(::Type{<:AbstractFill{T,N,Axes}}) where {T,N,Axes} = _IteratorSize(Axes) _IteratorSize(::Type{Tuple{}}) = Base.HasShape{0}() _IteratorSize(::Type{Tuple{T}}) where {T} = Base.IteratorSize(T) -# Julia Base has an optimized any for Tuples on versions >= v1.9 -# On lower versions, a recursive implementation helps with type-inference -if VERSION >= v"1.9.0-beta3" - _any(f, t::Tuple) = any(f, t) -else - _any(f, ::Tuple{}) = false - _any(f, t::Tuple) = f(t[1]) || _any(f, Base.tail(t)) -end function _IteratorSize(::Type{T}) where {T<:Tuple} N = fieldcount(T) s = ntuple(i-> Base.IteratorSize(fieldtype(T, i)), N) - _any(x -> x isa Base.IsInfinite, s) ? Base.IsInfinite() : Base.HasShape{N}() + any(x -> x isa Base.IsInfinite, s) ? Base.IsInfinite() : Base.HasShape{N}() end @@ -738,12 +730,6 @@ include("fillalgebra.jl") include("fillbroadcast.jl") include("trues.jl") -if !isdefined(Base, :get_extension) - include("../ext/FillArraysPDMatsExt.jl") - include("../ext/FillArraysSparseArraysExt.jl") - include("../ext/FillArraysStatisticsExt.jl") -end - ## # print ## @@ -752,15 +738,9 @@ Base.replace_in_print_matrix(::AbstractZeros, ::Integer, ::Integer, s::AbstractS # following support blocked fill array printing via # BlockArrays.jl -if VERSION < v"1.8-" - axes_print_matrix_row(lay, io, X, A, i, cols, sep) = - Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString}, - io, X, A, i, cols, sep) -else - axes_print_matrix_row(lay, io, X, A, i, cols, sep, idxlast::Integer=last(axes(X, 2))) = - Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString,Integer}, +axes_print_matrix_row(lay, io, X, A, i, cols, sep, idxlast::Integer=last(axes(X, 2))) = + Base.invoke(Base.print_matrix_row, Tuple{IO,AbstractVecOrMat,Vector,Integer,AbstractVector,AbstractString,Integer}, io, X, A, i, cols, sep, idxlast) -end Base.print_matrix_row(io::IO, X::Union{AbstractFillVector, diff --git a/test/runtests.jl b/test/runtests.jl index 088089d4..7ad5ad17 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -407,15 +407,12 @@ function test_addition_subtraction_dot(As, Bs, Tout::Type) @test @inferred(B - A) isa Tout{promote_type(eltype(B), eltype(A))} @test isapprox_or_undef(as_array(B - A), as_array(B) - as_array(A)) - # Julia 1.6 doesn't support dot(UniformScaling) - if VERSION < v"1.6.0" || VERSION >= v"1.8.0" - d1 = dot(A, B) - d2 = dot(as_array(A), as_array(B)) - d3 = dot(B, A) - d4 = dot(as_array(B), as_array(A)) - @test d1 ≈ d2 || d1 ≡ d2 - @test d3 ≈ d4 || d3 ≡ d4 - end + d1 = dot(A, B) + d2 = dot(as_array(A), as_array(B)) + d3 = dot(B, A) + d4 = dot(as_array(B), as_array(A)) + @test d1 ≈ d2 || d1 ≡ d2 + @test d3 ≈ d4 || d3 ≡ d4 end end end @@ -1930,9 +1927,7 @@ end E = Eye(2) K = kron(E, E) @test K isa Diagonal - if VERSION >= v"1.9" - @test K isa typeof(E) - end + @test K isa typeof(E) C = collect(E) @test K == kron(C, C) @@ -2789,11 +2784,7 @@ end ) O = OneElement(v,ind,sz) A = Array(O) - if VERSION >= v"1.10" - @test @inferred(sum(O)) === sum(A) - else - @test @inferred(sum(O)) == sum(A) - end + @test @inferred(sum(O)) === sum(A) @test @inferred(sum(O, init=zero(eltype(O)))) === sum(A, init=zero(eltype(O))) @test @inferred(sum(x->1, O, init=0)) === sum(Fill(1, axes(O)), init=0) end @@ -2948,13 +2939,7 @@ end end @testset "structured matrix" begin - # strange bug on Julia v1.6, see - # https://discourse.julialang.org/t/strange-seemingly-out-of-bounds-access-bug-in-julia-v1-6/101041 - bands = if VERSION >= v"1.9" - ((Fill(2,3), Fill(6,2)), (Zeros(3), Zeros(2))) - else - ((Fill(2,3), Fill(6,2)),) - end + bands = ((Fill(2,3), Fill(6,2)), (Zeros(3), Zeros(2))) @testset for (dv, ev) in bands for D in (Diagonal(dv), Bidiagonal(dv, ev, :U), Tridiagonal(ev, dv, ev), SymTridiagonal(dv, ev))