deprecate eye(::Type{Diagonal{T}}, n), introduce Diagonal[{T}](s::UniformScaling, n)#24415
Merged
Sacha0 merged 2 commits intoJuliaLang:masterfrom Nov 1, 2017
Merged
deprecate eye(::Type{Diagonal{T}}, n), introduce Diagonal[{T}](s::UniformScaling, n)#24415Sacha0 merged 2 commits intoJuliaLang:masterfrom
Sacha0 merged 2 commits intoJuliaLang:masterfrom
Conversation
0f04644 to
58e8ddc
Compare
fredrikekre
approved these changes
Oct 31, 2017
base/linalg/uniformscaling.jl
Outdated
|
|
||
| ## Diagonal construction from UniformScaling | ||
| Diagonal{T}(s::UniformScaling, m::Integer) where {T} = Diagonal{T}(fill(T(s.λ), m)) | ||
| Diagonal(s::UniformScaling, m::Integer) where {T} = Diagonal{eltype(s)}(s, m) |
Member
There was a problem hiding this comment.
Missing {T} on UniformScaling, so either add that and change eltype(s) to T or simply remove where {T}
Member
Author
There was a problem hiding this comment.
A beautiful example of why one shouldn't make "trivial changes" without retesting 😄. Thanks @fredrikekre!
Member
Author
|
Absent objections or requests for time, I plan to merge these changes tomorrow afternoon. Best! |
Member
Author
|
Thanks all! |
NHDaly
added a commit
to NHDaly/julia
that referenced
this pull request
Aug 30, 2018
The History.md file linked to JuliaLang#24413 for `eye` deprecation in 0.7. This commit changes it to link to JuliaLang#24415.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request first provides
Diagonal[{T}](s::UniformScaling, n)constructors as in #24372, and then deprecateseye(::Type{Diagonal{T}}, n)in favor of those constructors. (Thateyemethod is the soleeyemethod in base that accepts a container type as argument.) Ref. #11557 (comment) and JuliaLang/LinearAlgebra.jl#454. Best!