Make copyto!(A,I) work for rectangular matrices#28790
Merged
mbauman merged 3 commits intoJuliaLang:masterfrom Aug 22, 2018
Merged
Make copyto!(A,I) work for rectangular matrices#28790mbauman merged 3 commits intoJuliaLang:masterfrom
mbauman merged 3 commits intoJuliaLang:masterfrom
Conversation
Member
Tests would be lovely! It seems the |
add tests for `copyto!(::Matrix, ::UniformScaling)`
Sacha0
approved these changes
Aug 22, 2018
Contributor
Author
|
You're welcome. I assume the one travis error is unrelated? Sorry about the whitespace error at first; I edited online using Github, and indenting a blank line the same as the surrounding code lines seems to be the default. |
Member
|
Hah, funny, yes, that test failure is unrelated. Looks like it's the |
staticfloat
pushed a commit
that referenced
this pull request
Aug 24, 2018
* Make copyto!(A,I) work for rectangular matrices * add tests for `copyto!` add tests for `copyto!(::Matrix, ::UniformScaling)` * fix whitespace
mortenpi
added a commit
to mortenpi/julia
that referenced
this pull request
Dec 1, 2018
Add a docstring for copyto!(::AbstractMatrix, ::UniformScaling) and document 1.1 changes.
mortenpi
added a commit
to mortenpi/julia
that referenced
this pull request
Dec 1, 2018
Add a docstring for copyto!(::AbstractMatrix, ::UniformScaling) and document 1.1 changes.
mortenpi
added a commit
to mortenpi/julia
that referenced
this pull request
Dec 1, 2018
fredrikekre
pushed a commit
that referenced
this pull request
Dec 1, 2018
fredrikekre
pushed a commit
that referenced
this pull request
Dec 1, 2018
fredrikekre
pushed a commit
that referenced
this pull request
Dec 3, 2018
fredrikekre
pushed a commit
that referenced
this pull request
Dec 4, 2018
fredrikekre
pushed a commit
that referenced
this pull request
Dec 4, 2018
fredrikekre
added a commit
that referenced
this pull request
Dec 5, 2018
changes between Julia 1.0 and 1.1, including: - Custom .css-style for compat admonitions. - Information about compat annotations to CONTRIBUTING.md. - NEWS.md entry for PRs #30090, #30035, #30022, #29978, #29969, #29858, #29845, #29754, #29638, #29636, #29615, #29600, #29506, #29469, #29316, #29259, #29178, #29153, #29033, #28902, #28761, #28745, #28708, #28696, #29997, #28790, #29092, #29108, #29782 - Compat annotation for PRs #30090, #30013, #29978, #29890, #29858, #29827, #29754, #29679, #29636, #29623, #29600, #29440, #29316, #29259, #29178, #29157, #29153, #29033, #28902, #28878, #28761, #28708, #28156, #29733, #29670, #29997, #28790, #29092, #29108, #29782, #25278 - Documentation for broadcasting CartesianIndices (#30230). - Documentation for Base.julia_cmd(). - Documentation for colon constructor of CartesianIndices (#29440). - Documentation for ^(::Matrix, ::Number) and ^(::Number, ::Matrix). - Run NEWS-update.jl. Co-authored-by: Morten Piibeleht <morten.piibeleht@gmail.com> Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
fredrikekre
added a commit
that referenced
this pull request
Dec 5, 2018
changes between Julia 1.0 and 1.1, including: - Custom .css-style for compat admonitions. - Information about compat annotations to CONTRIBUTING.md. - NEWS.md entry for PRs #30090, #30035, #30022, #29978, #29969, #29858, #29845, #29754, #29638, #29636, #29615, #29600, #29506, #29469, #29316, #29259, #29178, #29153, #29033, #28902, #28761, #28745, #28708, #28696, #29997, #28790, #29092, #29108, #29782 - Compat annotation for PRs #30090, #30013, #29978, #29890, #29858, #29827, #29754, #29679, #29636, #29623, #29600, #29440, #29316, #29259, #29178, #29157, #29153, #29033, #28902, #28878, #28761, #28708, #28156, #29733, #29670, #29997, #28790, #29092, #29108, #29782, #25278 - Documentation for broadcasting CartesianIndices (#30230). - Documentation for Base.julia_cmd(). - Documentation for colon constructor of CartesianIndices (#29440). - Documentation for ^(::Matrix, ::Number) and ^(::Number, ::Matrix). - Run NEWS-update.jl. Co-authored-by: Morten Piibeleht <morten.piibeleht@gmail.com> Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
fredrikekre
added a commit
that referenced
this pull request
Dec 5, 2018
Addition of NEWS and compat admonitions for important changes between Julia 1.0 and 1.1, including: - Custom .css-style for compat admonitions. - Information about compat annotations to CONTRIBUTING.md. - NEWS.md entry for PRs #30090, #30035, #30022, #29978, #29969, #29858, #29845, #29754, #29638, #29636, #29615, #29600, #29506, #29469, #29316, #29259, #29178, #29153, #29033, #28902, #28761, #28745, #28708, #28696, #29997, #28790, #29092, #29108, #29782 - Compat annotation for PRs #30090, #30013, #29978, #29890, #29858, #29827, #29754, #29679, #29636, #29623, #29600, #29440, #29316, #29259, #29178, #29157, #29153, #29033, #28902, #28878, #28761, #28708, #28156, #29733, #29670, #29997, #28790, #29092, #29108, #29782, #25278 - Documentation for broadcasting CartesianIndices (#30230). - Documentation for Base.julia_cmd(). - Documentation for colon constructor of CartesianIndices (#29440). - Documentation for ^(::Matrix, ::Number) and ^(::Number, ::Matrix). - Run NEWS-update.jl. Co-authored-by: Morten Piibeleht <morten.piibeleht@gmail.com> Co-authored-by: Fredrik Ekre <ekrefredrik@gmail.com>
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.
Given that
Matrix{T}(I, (m,n))works for rectangular matricesm != n, I would also expectcopyto!(A,I)to work. I often use this to initialize an existing matrix with ones on the diagonal, even if it is rectangular.An example is in LinearAlgebra, suppose you want to materialize the q factor in a QR decomposition. You might have two equally sized matrices
AandBlying around:I'll probably need to update some tests as well?