Skip to content

Commit 0949403

Browse files
committed
Revert "check shapes, not length, to account for arrays with 0-length dims"
This reverts commit 84805a4.
1 parent 3af5c38 commit 0949403

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/lib/broadcast.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ end
5555

5656
function unbroadcast(x::AbstractArray, x̄)
5757
N = ndims(x̄)
58-
if size(x) == size(x̄)
58+
if length(x) == length(x̄)
5959
_project(x, x̄) # ProjectTo handles reshape, offsets, structured matrices, row vectors
6060
else
6161
dims = ntuple(d -> size(x, d) == 1 ? d : ndims(x̄)+1, ndims(x̄))

0 commit comments

Comments
 (0)