Skip to content

Commit 363b22c

Browse files
author
Pietro Vertechi
committed
remove staticschema method for arrays
1 parent 876db48 commit 363b22c

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/lazy.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ Base.getproperty(s::LazyRows, key::Symbol) = getproperty(parent(s), key)
4040
Base.getproperty(s::LazyRows, key::Int) = getproperty(parent(s), key)
4141
Base.propertynames(c::LazyRows) = propertynames(parent(c))
4242

43-
staticschema(::Type{LazyRows{T, N, C, I}}) where {T, N, C, I} = staticschema(StructArray{T, N, C, I})
44-
4543
Base.size(v::LazyRows) = size(parent(v))
4644
Base.getindex(v::LazyRows{<:Any, <:Any, <:Any, Int}, i::Int) = LazyRow(parent(v), i)
4745
Base.getindex(v::LazyRows{<:Any, <:Any, <:Any, CartesianIndex{N}}, i::Vararg{Int, N}) where {N} = LazyRow(parent(v), CartesianIndex(i))

src/structarray.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ fieldarrays(s::StructArray) = getfield(s, :fieldarrays)
126126
Base.getproperty(s::StructArray, key::Symbol) = getfield(fieldarrays(s), key)
127127
Base.getproperty(s::StructArray, key::Int) = getfield(fieldarrays(s), key)
128128
Base.propertynames(s::StructArray) = propertynames(fieldarrays(s))
129-
staticschema(::Type{<:StructArray{T}}) where {T} = staticschema(T)
130129

131130
Base.size(s::StructArray) = size(fieldarrays(s)[1])
132131
Base.size(s::StructArray{<:Any, <:Any, <:EmptyTup}) = (0,)

test/runtests.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ end
2424

2525
@testset "utils" begin
2626
t = StructArray(rand(ComplexF64, 2, 2))
27-
T = staticschema(typeof(t))
27+
T = staticschema(eltype(t))
2828
@test StructArrays.eltypes(T) == NamedTuple{(:re, :im), Tuple{Float64, Float64}}
2929
@test StructArrays.map_params(eltype, T) == NamedTuple{(:re, :im), Tuple{Float64, Float64}}
3030
@test StructArrays.map_params(eltype, StructArrays.astuple(T)) == Tuple{Float64, Float64}
@@ -579,7 +579,7 @@ end
579579
rows = LazyRows(s)
580580
@test propertynames(rows) == (:re, :im)
581581
@test propertynames(rows[1]) == (:re, :im)
582-
@test staticschema(typeof(rows)) == staticschema(eltype(rows)) == staticschema(ComplexF64)
582+
@test staticschema(eltype(rows)) == staticschema(ComplexF64)
583583
@test getproperty(rows, 1) isa Matrix{Float64}
584584
@test getproperty(rows, :re) isa Matrix{Float64}
585585
@test IndexStyle(rows) isa IndexCartesian
@@ -593,7 +593,7 @@ end
593593
rows = LazyRows(s)
594594
@test propertynames(rows) == (:re, :im)
595595
@test propertynames(rows[1]) == (:re, :im)
596-
@test staticschema(typeof(rows)) == staticschema(eltype(rows)) == staticschema(ComplexF64)
596+
@test staticschema(eltype(rows)) == staticschema(ComplexF64)
597597
@test getproperty(rows, 1) isa Matrix{Float64}
598598
@test getproperty(rows, :re) isa Matrix{Float64}
599599
@test IndexStyle(rows) isa IndexLinear

0 commit comments

Comments
 (0)