Skip to content

Commit 289bcb2

Browse files
committed
Fix dimension check
1 parent af55f62 commit 289bcb2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/host/linalg.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,8 +265,8 @@ function LinearAlgebra.mul!(C::Diagonal{<:Any, <:AbstractGPUArray},
265265
d = length(dc)
266266
m, n = size(A, 1), size(A, 2)
267267
m′, n′ = size(B, 1), size(B, 2)
268-
length(m) == d || throw(DimensionMismatch("left hand side has $m rows but output is $d by $d"))
269-
length(n′) == d || throw(DimensionMismatch("right hand side has $n′ cols but output is $d by $d"))
268+
m == d || throw(DimensionMismatch("left hand side has $m rows but output is $d by $d"))
269+
n′ == d || throw(DimensionMismatch("right hand side has $n′ cols but output is $d by $d"))
270270
C_ = A * B
271271
isdiag(C_) || throw(ErrorException("output matrix must be diagonal"))
272272
dc .= diag(C_)

0 commit comments

Comments
 (0)