Skip to content

Commit 9868632

Browse files
jishnubdlfivefifty
andauthored
Don't specialize Base._reshape (#374)
* Don't specialize Base._reshape * Restore downstream tests --------- Co-authored-by: Sheehan Olver <[email protected]>
1 parent 222bfd8 commit 9868632

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.github/workflows/downstream.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ jobs:
4040
package:
4141
- {repo: Distributions.jl, group: JuliaStats}
4242
- {repo: BlockArrays.jl, group: JuliaArrays}
43-
# - {repo: LazyArrays.jl, group: JuliaArrays}
43+
- {repo: LazyArrays.jl, group: JuliaArrays}
44+
- {repo: InfiniteArrays.jl, group: JuliaArrays}
4445
- {repo: ArrayLayouts.jl, group: JuliaLinearAlgebra}
45-
# - {repo: LazyBandedMatrices.jl, group: JuliaLinearAlgebra}
46+
- {repo: LazyBandedMatrices.jl, group: JuliaLinearAlgebra}
4647
- {repo: BandedMatrices.jl, group: JuliaLinearAlgebra}
4748
- {repo: BlockBandedMatrices.jl, group: JuliaLinearAlgebra}
48-
# - {repo: InfiniteLinearAlgebra.jl, group: JuliaLinearAlgebra}
49+
- {repo: InfiniteLinearAlgebra.jl, group: JuliaLinearAlgebra}
4950
- {repo: Optim.jl, group: JuliaNLSolvers}
5051

5152
steps:

src/FillArrays.jl

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,17 +272,12 @@ reshape(parent::AbstractFill, dims::Tuple{Vararg{Union{Int,Colon}}}) =
272272
fill_reshape(parent, Base._reshape_uncolon(parent, dims)...)
273273
reshape(parent::AbstractFill, shp::Tuple{Union{Integer,Base.OneTo}, Vararg{Union{Integer,Base.OneTo}}}) =
274274
reshape(parent, Base.to_shape(shp))
275-
reshape(parent::AbstractFill, dims::Dims) = Base._reshape(parent, dims)
276-
reshape(parent::AbstractFill, dims::Tuple{Integer, Vararg{Integer}}) = Base._reshape(parent, dims)
275+
reshape(parent::AbstractFill, dims::Dims) = fill_reshape(parent, dims...)
276+
reshape(parent::AbstractFill, dims::Tuple{Integer, Vararg{Integer}}) = fill_reshape(parent, dims...)
277277

278278
# resolve ambiguity with Base
279279
reshape(parent::AbstractFillVector, dims::Tuple{Colon}) = parent
280280

281-
Base._reshape(parent::AbstractFill, dims::Dims) = fill_reshape(parent, dims...)
282-
Base._reshape(parent::AbstractFill, dims::Tuple{Integer,Vararg{Integer}}) = fill_reshape(parent, dims...)
283-
# Resolves ambiguity error with `_reshape(v::AbstractArray{T, 1}, dims::Tuple{Int})`
284-
Base._reshape(parent::AbstractFill{T, 1, Axes}, dims::Tuple{Int}) where {T, Axes} = fill_reshape(parent, dims...)
285-
286281
for (AbsTyp, Typ, funcs, func) in ((:AbstractZeros, :Zeros, :zeros, :zero), (:AbstractOnes, :Ones, :ones, :one))
287282
@eval begin
288283
abstract type $AbsTyp{T, N, Axes} <: AbstractFill{T, N, Axes} end

0 commit comments

Comments
 (0)