Skip to content

Commit e63f465

Browse files
mortenpifredrikekre
authored andcommitted
News and compat for #28790 copyto!(::AbstractMatrix, ::UniformScaling)
1 parent 219f277 commit e63f465

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
@@ -77,6 +77,7 @@ Standard library changes
7777
* New `sort!(::AbstractArray; dims)` method that can sort the array along the `dims` dimension ([#28902]).
7878
* `range` now accept `stop` as a positional argument ([#28708]).
7979
* `parse(Bool, str)` is now supported ([#29997]).
80+
* `copyto!(::AbstractMatrix, ::UniformScaling)` supports rectangular matrices now ([#28790]).
8081

8182
Compiler/Runtime improvements
8283
-----------------------------

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)