Skip to content

Commit

Permalink
Fix downstream issue where only copy is supported in _copy_oftype
Browse files Browse the repository at this point in the history
  • Loading branch information
dlfivefifty committed May 22, 2023
1 parent ec975cd commit 5ccd819
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "FillArrays"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "1.0.1"
version = "1.0.2"

[deps]
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand Down
2 changes: 1 addition & 1 deletion src/fillbroadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function broadcasted(::DefaultArrayStyle{1}, ::typeof(*), a::AbstractRange{V}, b
end

_copy_oftype(A::AbstractArray, ::Type{S}) where {S} = eltype(A) == S ? copy(A) : AbstractArray{S}(A)
_copy_oftype(A::AbstractRange, ::Type{S}) where {S} = map(S, A)
_copy_oftype(A::AbstractRange, ::Type{S}) where {S} = eltype(A) == S ? copy(A) : map(S, A)

for op in (:+, :-)
@eval begin
Expand Down

0 comments on commit 5ccd819

Please sign in to comment.