Skip to content

Commit aa90565

Browse files
committed
Remove Matrix[{T}](S::UniformScaling, n::Integer) convenience constructors.
1 parent 6e4f2fa commit aa90565

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

base/linalg/uniformscaling.jl

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,6 @@ Matrix{T}(s::UniformScaling, dims::Dims{2}) where {T} = setindex!(zeros(T, dims)
378378
Matrix{T}(s::UniformScaling, m::Integer, n::Integer) where {T} = Matrix{T}(s, Dims((m, n)))
379379
Matrix(s::UniformScaling, m::Integer, n::Integer) = Matrix(s, Dims((m, n)))
380380
Matrix(s::UniformScaling, dims::Dims{2}) = Matrix{eltype(s)}(s, dims)
381-
# convenience variations that accept a single integer to specify dims
382-
Matrix{T}(s::UniformScaling, m::Integer) where {T} = Matrix{T}(s, m, m)
383-
Matrix(s::UniformScaling, m::Integer) = Matrix(s, m, m)
384381

385382
## Diagonal construction from UniformScaling
386383
Diagonal{T}(s::UniformScaling, m::Integer) where {T} = Diagonal{T}(fill(T(s.λ), m))

test/linalg/uniformscaling.jl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,10 @@ end
191191
end
192192

193193
@testset "Matrix construction from UniformScaling" begin
194-
@test Matrix(2I, 3)::Matrix{Int} == 2*eye(3)
195194
@test Matrix(2I, 3, 3)::Matrix{Int} == 2*eye(3)
196195
@test Matrix(2I, 3, 4)::Matrix{Int} == 2*eye(3, 4)
197196
@test Matrix(2I, 4, 3)::Matrix{Int} == 2*eye(4, 3)
198197
@test Matrix(2.0I, 3, 3)::Matrix{Float64} == 2*eye(3)
199-
@test Matrix{Real}(2I, 3)::Matrix{Real} == 2*eye(3)
200198
@test Matrix{Real}(2I, 3, 3)::Matrix{Real} == 2*eye(3)
201199
@test Matrix{Float64}(2I, 3, 3)::Matrix{Float64} == 2*eye(3)
202200
end

0 commit comments

Comments
 (0)