Skip to content

Commit 7a46d08

Browse files
authored
Revert "Fix BroadcastStyle for FillArrays (#215)" (#216)
This reverts commit 4101429.
1 parent 4101429 commit 7a46d08

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "InfiniteArrays"
22
uuid = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
3-
version = "0.15.6"
3+
version = "0.15.5"
44

55
[deps]
66
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"

src/infarrays.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,9 @@ end
167167
# Lazy Broadcasting
168168
for typ in (:Ones, :Zeros, :Fill)
169169
@eval begin
170-
BroadcastStyle(::Type{<:$typ{T,N,<:Tuple{OneToInf, Vararg{OneToInf}}}}) where {T,N} = LazyArrayStyle{N}()
171-
BroadcastStyle(::Type{<:$typ{T,2,<:Tuple{Any,OneToInf}}}) where {T} = LazyArrayStyle{2}()
172-
BroadcastStyle(::Type{<:$typ{T,2,<:Tuple{OneToInf,Any}}}) where {T} = LazyArrayStyle{2}()
173-
BroadcastStyle(::Type{<:$typ{T,2,<:Tuple{OneToInf,OneToInf}}}) where {T} = LazyArrayStyle{2}()
170+
BroadcastStyle(::Type{$typ{T,N,NTuple{N,<:OneToInf}}}) where {T,N} = LazyArrayStyle{N}()
171+
BroadcastStyle(::Type{$typ{T,2,<:Tuple{<:Any,<:OneToInf}}}) where {T} = LazyArrayStyle{2}()
172+
BroadcastStyle(::Type{$typ{T,2,<:Tuple{<:OneToInf,<:Any}}}) where {T} = LazyArrayStyle{2}()
174173
end
175174
end
176175

@@ -431,4 +430,4 @@ LazyArrays.cache_getindex(::InfiniteCardinal{0}, A::AbstractVector, I, J...) = l
431430
LazyArrays.cache_getindex(::InfiniteCardinal{0}, A::CachedVector{<:Any,<:AbstractVector,<:AbstractFill{<:Any,1}}, I::AbstractVector) = LazyArrays.cache_getindex(nothing, A, I)
432431

433432

434-
*(a::AbstractVector, b::AbstractFill{<:Any,2,Tuple{OneTo{Int},OneToInf{Int}}}) = ApplyArray(*,a,b)
433+
*(a::AbstractVector, b::AbstractFill{<:Any,2,Tuple{OneTo{Int},OneToInf{Int}}}) = ApplyArray(*,a,b)

test/runtests.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -884,13 +884,6 @@ end
884884
@test broadcast(*, 1:∞, Fill(2,∞)') isa BroadcastArray
885885
@test broadcast(*, Diagonal(1:∞), Ones{Int}(∞)') broadcast(*, Ones{Int}(∞)', Diagonal(1:∞)) Diagonal(1:∞)
886886
@test broadcast(*, Diagonal(1:∞), Fill(2,∞)') broadcast(*, Fill(2,∞)', Diagonal(1:∞)) Diagonal(2:2:∞)
887-
888-
@test !(Broadcast.BroadcastStyle(typeof(Fill(4))) isa LazyArrayStyle)
889-
@test Broadcast.BroadcastStyle(typeof(Fill(4, ∞))) isa LazyArrayStyle{1}
890-
@test Broadcast.BroadcastStyle(typeof(Fill(4, ∞, ∞))) isa LazyArrayStyle{2}
891-
@test Broadcast.BroadcastStyle(typeof(Fill(4, ∞, 1))) isa LazyArrayStyle{2}
892-
@test Broadcast.BroadcastStyle(typeof(Fill(4, 1, ∞))) isa LazyArrayStyle{2}
893-
@test Broadcast.BroadcastStyle(typeof(Fill(4, ∞, ∞, ∞))) isa LazyArrayStyle{3}
894887
end
895888

896889
@testset "subview inf broadcast" begin

0 commit comments

Comments
 (0)