Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "ArrayLayouts"
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
authors = ["Sheehan Olver <[email protected]>"]
version = "0.4.11"
version = "0.4.12"

[deps]
Compat = "34da2185-b29b-5c13-b0c7-acf172513d20"
Expand All @@ -11,7 +11,7 @@ SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
Compat = "3.16"
FillArrays = "0.9.1, 0.10"
FillArrays = "0.10.1"
julia = "1"

[extras]
Expand Down
4 changes: 2 additions & 2 deletions src/memorylayout.jl
Original file line number Diff line number Diff line change
Expand Up @@ -534,8 +534,8 @@ transposelayout(L::AbstractFillLayout) = L
_getindex_value(V::SubArray) = getindex_value(parent(V))

sub_materialize(::AbstractFillLayout, V, ax) = Fill(_getindex_value(V), ax)
sub_materialize(::ZerosLayout, V, ax) = Zeros(ax)
sub_materialize(::OnesLayout, V, ax) = Ones(ax)
sub_materialize(::ZerosLayout, V, ax) = Zeros{eltype(V)}(ax)
sub_materialize(::OnesLayout, V, ax) = Ones{eltype(V)}(ax)

abstract type AbstractBandedLayout <: MemoryLayout end
abstract type AbstractTridiagonalLayout <: AbstractBandedLayout end
Expand Down
4 changes: 2 additions & 2 deletions test/test_layouts.jl
Original file line number Diff line number Diff line change
Expand Up @@ -296,8 +296,8 @@ struct FooNumber <: Number end
@test MemoryLayout(Transpose(Fill(1+0im,10,2))) == FillLayout()

@test layout_getindex(Fill(1,10), 1:3) ≡ Fill(1,3)
@test layout_getindex(Ones(1,10), 1, 1:3) ≡ Ones(3)
@test layout_getindex(Zeros(5,10,12), 1, 1:3,4:6) ≡ Zeros(3,3)
@test layout_getindex(Ones{Int}(1,10), 1, 1:3) ≡ Ones{Int}(3)
@test layout_getindex(Zeros{Int}(5,10,12), 1, 1:3,4:6) ≡ Zeros{Int}(3,3)
end

@testset "Triangular col/rowsupport" begin
Expand Down