|
561 | 561 | @test issparse(hvcat((2,), othervecormat, spvec)) |
562 | 562 | @test issparse(cat(spvec, othervecormat; dims=(1,2))) |
563 | 563 | @test issparse(cat(othervecormat, spvec; dims=(1,2))) |
| 564 | + |
| 565 | + # inferrability (https://github.com/JuliaSparse/SparseArrays.jl/pull/92) |
| 566 | + cat_with_constdims(args...) = cat(args...; dims=(1,2)) |
| 567 | + @test issparse(@inferred cat_with_constdims(spvec, othervecormat)) |
| 568 | + @test issparse(@inferred cat_with_constdims(othervecormat, spvec)) |
564 | 569 | end |
565 | 570 | # The preceding tests should cover multi-way combinations of those types, but for good |
566 | 571 | # measure test a few multi-way combinations involving those types |
|
572 | 577 | @test issparse(hvcat((5,), spvec, densemat, diagmat, densevec, spmat)) |
573 | 578 | @test issparse(cat(densemat, diagmat, spmat, densevec, spvec; dims=(1,2))) |
574 | 579 | @test issparse(cat(spvec, diagmat, densevec, spmat, densemat; dims=(1,2))) |
| 580 | + |
| 581 | + # inferrability (https://github.com/JuliaSparse/SparseArrays.jl/pull/92) |
| 582 | + cat_with_constdims(args...) = cat(args...; dims=(1,2)) |
| 583 | + @test issparse(@inferred cat_with_constdims(densemat, diagmat, spmat, densevec, spvec)) |
| 584 | + @test issparse(@inferred cat_with_constdims(spvec, diagmat, densevec, spmat, densemat)) |
575 | 585 | end |
576 | 586 | @testset "vertical concatenation of SparseVectors with different el- and ind-type (#22225)" begin |
577 | 587 | spv6464 = SparseVector(0, Int64[], Int64[]) |
|
0 commit comments