Skip to content

Commit 9fbed3a

Browse files
authored
Fix typing in FillArrays sub_materialize (#48)
* Fix typing in FillArrays sub_materialize * Update Project.toml
1 parent 4a5efd7 commit 9fbed3a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ArrayLayouts"
22
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.4.11"
4+
version = "0.4.12"
55

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

1212
[compat]
1313
Compat = "3.16"
14-
FillArrays = "0.9.1, 0.10"
14+
FillArrays = "0.10.1"
1515
julia = "1"
1616

1717
[extras]

src/memorylayout.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,8 +534,8 @@ transposelayout(L::AbstractFillLayout) = L
534534
_getindex_value(V::SubArray) = getindex_value(parent(V))
535535

536536
sub_materialize(::AbstractFillLayout, V, ax) = Fill(_getindex_value(V), ax)
537-
sub_materialize(::ZerosLayout, V, ax) = Zeros(ax)
538-
sub_materialize(::OnesLayout, V, ax) = Ones(ax)
537+
sub_materialize(::ZerosLayout, V, ax) = Zeros{eltype(V)}(ax)
538+
sub_materialize(::OnesLayout, V, ax) = Ones{eltype(V)}(ax)
539539

540540
abstract type AbstractBandedLayout <: MemoryLayout end
541541
abstract type AbstractTridiagonalLayout <: AbstractBandedLayout end

test/test_layouts.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,8 +296,8 @@ struct FooNumber <: Number end
296296
@test MemoryLayout(Transpose(Fill(1+0im,10,2))) == FillLayout()
297297

298298
@test layout_getindex(Fill(1,10), 1:3) Fill(1,3)
299-
@test layout_getindex(Ones(1,10), 1, 1:3) Ones(3)
300-
@test layout_getindex(Zeros(5,10,12), 1, 1:3,4:6) Zeros(3,3)
299+
@test layout_getindex(Ones{Int}(1,10), 1, 1:3) Ones{Int}(3)
300+
@test layout_getindex(Zeros{Int}(5,10,12), 1, 1:3,4:6) Zeros{Int}(3,3)
301301
end
302302

303303
@testset "Triangular col/rowsupport" begin

0 commit comments

Comments
 (0)