Skip to content

Commit 2e13389

Browse files
authored
Update sparsevector.jl
1 parent 1b990c1 commit 2e13389

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/sparsevector.jl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,16 +1243,16 @@ function hvcat_internal(rows::Tuple{Vararg{Int}}, X1::_SparseConcatGroup, X::_Sp
12431243
if anysparse(X1) || anysparse(X...)
12441244
vcat(_hvcat_rows(rows, X1, X...)...)
12451245
else
1246-
if X1 isa Number && all(Base.Fix2(isa, Number), X)
1247-
# Needed to match error type with Base Julia. See https://github.com/JuliaLang/julia/pull/56543#issuecomment-2508637550
1248-
matrix_len = if length(rows) == 0
1249-
0
1250-
else
1251-
length(rows) * rows[1]
1252-
end
1253-
if matrix_len != 1 + length(X)
1254-
throw(ArgumentError("argument count does not match specified shape (expected $matrix_len, got $(1+length(X)))"))
1255-
end
1246+
if X1 isa Number && all(Base.Fix2(isa, Number), X)
1247+
# Needed to match error type with Base Julia. See https://github.com/JuliaLang/julia/pull/56543#issuecomment-2508637550
1248+
matrix_len = if length(rows) == 0
1249+
0
1250+
else
1251+
length(rows) * rows[1]
1252+
end
1253+
if matrix_len != 1 + length(X)
1254+
throw(ArgumentError("argument count does not match specified shape (expected $matrix_len, got $(1+length(X)))"))
1255+
end
12561256
end
12571257
Base.typed_hvcat(Base.promote_eltypeof(X1, X...), rows, X1, X...)
12581258
end

0 commit comments

Comments
 (0)