Skip to content

Commit 970a3d7

Browse files
committed
News and compat annotation for JuliaLang#28790
Add a docstring for copyto!(::AbstractMatrix, ::UniformScaling) and document 1.1 changes.
1 parent 799f712 commit 970a3d7

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ Standard library changes
7070
* New `sort!(::AbstractArray; dims)` method that can sort the array along the `dims` dimension ([#28902]).
7171
* `range` now accept `stop` as a positional argument ([#28708]).
7272
* `parse(Bool, str)` is now supported ([#29997]).
73+
* `copyto!(::AbstractMatrix, ::UniformScaling)` supports rectangular matrices now. ([#28790])
7374

7475
Compiler/Runtime improvements
7576
-----------------------------

stdlib/LinearAlgebra/src/uniformscaling.jl

+9
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,15 @@ function isapprox(J::UniformScaling, A::AbstractMatrix;
212212
end
213213
isapprox(A::AbstractMatrix, J::UniformScaling; kwargs...) = isapprox(J, A; kwargs...)
214214

215+
"""
216+
copyto!(dest::AbstractMatrix, src::UniformScaling)
217+
218+
Copies a [`UniformScaling`](@ref) onto a matrix.
219+
220+
!!! compat "Julia 1.1"
221+
In Julia 1.0 this method only supported a square destination matrix. Julia 1.1. added
222+
support for a rectangular matrix.
223+
"""
215224
function copyto!(A::AbstractMatrix, J::UniformScaling)
216225
@assert !has_offset_axes(A)
217226
fill!(A, 0)

0 commit comments

Comments
 (0)