Skip to content

Commit 1fbcae1

Browse files
authored
For codecov
1 parent e8f57bb commit 1fbcae1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/LinearMaps.jl

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,10 @@ function check_dim_mul(C, A, B)
5252
# @info "checked vector dimensions" # uncomment for testing
5353
mA, nA = size(A) # A always has two dimensions
5454
mB, nB = size(B, 1), size(B, 2)
55-
if mB != nA
56-
throw(DimensionMismatch("left factor has dimensions ($mA,$nA), right factor has dimensions ($mB,$nB)"))
57-
end
58-
if size(C, 1) != mA || size(C, 2) != nB
55+
(mB == nA) ||
56+
throw(DimensionMismatch("left factor has dimensions ($mA,$nA), right factor has dimensions ($mB,$nB)")
57+
(size(C, 1) != mA || size(C, 2) != nB) &&
5958
throw(DimensionMismatch("result has dimensions $(size(C)), needs ($mA,$nB)"))
60-
end
6159
return nothing
6260
end
6361

0 commit comments

Comments
 (0)