-
-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
hcat/vcat/hvcat bug #885
Comments
Can you submit a PR? Seems like it would be good to fix. |
That was my very first attempt in the extension of |
Fixed on master? julia> [1 2; I]
3×2 Matrix{Int64}:
1 2
1 0
0 1 |
True. I thought JuliaLang/julia@18f2f9f might have been included earlier, but it's going to be released with v1.8. |
The following wrong outputs are hopefully also fixed:
|
Yes: julia> [1 I]
1×2 Matrix{Int64}:
1 1
julia> [1; I]
2×1 Matrix{Int64}:
1
1
julia> [1 1; 1 I]
2×2 Matrix{Int64}:
1 1
1 1 |
The following simple matrix construction fails (joint finding with John Verzani #364):
but [[1] [2]; I] and [[1 2]; I] work correctly:
I think, a simple fix would be to replace line 393 of
LinearAlgebra.UniformScaling
promote_to_arrays_(n::Int, ::Type, a::Number) = a
with
promote_to_arrays_(n::Int, ::Type, a::Number) = [a]
The text was updated successfully, but these errors were encountered: