Skip to content

Commit

Permalink
Simply call _copy instead of passing through the broadcast machinery …
Browse files Browse the repository at this point in the history
…again
  • Loading branch information
jmert committed Jan 5, 2019
1 parent 26ed753 commit 9bec023
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stdlib/SparseArrays/src/higherorderfns.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ function copy(bc::Broadcasted{PromoteToSparse})
if can_skip_sparsification(bcf.f, bcf.args...)
return _copy(bcf.f, bcf.args...)
elseif is_supported_sparse_broadcast(bcf.args...)
return broadcast(bcf.f, map(_sparsifystructured, bcf.args)...)
return _copy(bcf.f, map(_sparsifystructured, bcf.args)...)
else
return copy(convert(Broadcasted{Broadcast.DefaultArrayStyle{length(axes(bc))}}, bc))
end
Expand Down

0 comments on commit 9bec023

Please sign in to comment.