Skip to content

Commit 1e6ad02

Browse files
authored
Fallback function broadcast zero check (#315)
* Fallback function broadcast zero check * remove redundant check
1 parent bcedda1 commit 1e6ad02

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/generic/broadcast.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -300,8 +300,6 @@ function _banded_broadcast!(dest::AbstractMatrix, f, (x,src)::Tuple{Number,Abstr
300300
d_l, d_u = bandwidths(dest)
301301
s_l, s_u = bandwidths(src)
302302

303-
checkzerobands(dest, f, src)
304-
305303
_banded_broadcast_anylayout!(dest, src, f_x, z, (s_l, s_u), (d_l, d_u), m)
306304

307305
dest

test/test_broadcasting.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ import BandedMatrices: BandedStyle, BandedRows
9999
A .= B
100100
@test A == B
101101

102+
B = brand(1,4,0,1)
103+
C = brand(size(B)...,0,0)
104+
@test_throws BandError C .= B
105+
@test_throws BandError C' .= B'
106+
102107
@testset "empty dest" begin
103108
test_empty((D,B) -> D .= B)
104109
end

0 commit comments

Comments
 (0)