Skip to content

Commit 2833791

Browse files
committed
Use size instead of sum
1 parent 561d510 commit 2833791

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/banded/BandedMatrix.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ function _BandedMatrix(::BandedRows, A::AbstractMatrix)
268268
bdata = bandedrowsdata(A)
269269
u, ℓ = bandwidths(A)
270270
m, n = size(A)
271-
data_new = similar(bdata, eltype(bdata), + u + 1, n)
271+
data_new = similar(bdata, eltype(bdata), size(bdata, 2), n)
272272
for i in 1:(ℓ+u+1)
273273
d = u + 1 - i
274274
row_new =+ 1 + d

0 commit comments

Comments
 (0)