Skip to content

Commit 03087c3

Browse files
authored
Fix for #90 (#91)
* attempt at fix of #90 * added test for 1-d reshape * bump to 0.8.7 * aight now it should be fine * added impl for word-size of 32 * fixed typo in comment * replaced two impls using Int32 and Int64 with Int
1 parent 8e2d672 commit 03087c3

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "FillArrays"
22
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
3-
version = "0.8.6"
3+
version = "0.8.7"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/FillArrays.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ reshape(parent::AbstractFill, dims::Dims) = Base._reshape(parent, dims)
179179
reshape(parent::AbstractFill, dims::Tuple{Integer, Vararg{Integer}}) = Base._reshape(parent, dims)
180180
Base._reshape(parent::AbstractFill, dims::Dims) = fill_reshape(parent, dims...)
181181
Base._reshape(parent::AbstractFill, dims::Tuple{Integer,Vararg{Integer}}) = fill_reshape(parent, dims...)
182+
# Resolves ambiguity error with `_reshape(v::AbstractArray{T, 1}, dims::Tuple{Int})`
183+
Base._reshape(parent::AbstractFill{T, 1, Axes}, dims::Tuple{Int}) where {T, Axes} = fill_reshape(parent, dims...)
182184

183185
for (Typ, funcs, func) in ((:Zeros, :zeros, :zero), (:Ones, :ones, :one))
184186
@eval begin

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -950,4 +950,5 @@ end
950950
@test reshape(Zeros(6),2,3) Zeros(2,3)
951951
@test reshape(Zeros(6),big(2),3) == Zeros(big(2),3)
952952
@test reshape(Fill(2,2,3),Val(1)) Fill(2,6)
953+
@test reshape(Fill(2, 2), (2, )) Fill(2, 2)
953954
end

0 commit comments

Comments
 (0)