-
-
Notifications
You must be signed in to change notification settings - Fork 115
Closed
Description
In Julia v0.7 you don't need to specify the eltype of the matrix - it is inferred from the UniformScaling{T} input. Compat has only defined the Matrix{T}(::UniformScaling, n, m) method.
# Julia v0.6.2
julia> using Compat
julia> Matrix(I, 4, 4)
ERROR: MethodError: no method matching Array{T,2} where T(::UniformScaling{Int64}, ::Int64, ::Int64)
Closest candidates are:
Array{T,2} where T(::Compat.Uninitialized, ::Any...) at string:5
Array{T,2} where T(::Integer, ::Integer) at sysimg.jl:105
julia> Matrix{Float64}(I, 4, 4)
4×4 Array{Float64,2}:
1.0 0.0 0.0 0.0
0.0 1.0 0.0 0.0
0.0 0.0 1.0 0.0
0.0 0.0 0.0 1.0
Metadata
Metadata
Assignees
Labels
No labels