Skip to content
Permalink
Browse files

News and compat for #28790 copyto!(::AbstractMatrix, ::UniformScaling)

  • Loading branch information...
mortenpi authored and fredrikekre committed Dec 1, 2018
1 parent 8cf4b34 commit 7d5ff0fbb289c1dfd2dcd4ce8c3ea6db30af3cd0
Showing with 10 additions and 0 deletions.
  1. +1 −0 NEWS.md
  2. +9 −0 stdlib/LinearAlgebra/src/uniformscaling.jl
@@ -79,6 +79,7 @@ Standard library changes
* New `sort!(::AbstractArray; dims)` method that can sort the array along the `dims` dimension ([#28902]).
* `range` now accept `stop` as a positional argument ([#28708]).
* `parse(Bool, str)` is now supported ([#29997]).
* `copyto!(::AbstractMatrix, ::UniformScaling)` supports rectangular matrices now ([#28790]).

Compiler/Runtime improvements
-----------------------------
@@ -212,6 +212,15 @@ function isapprox(J::UniformScaling, A::AbstractMatrix;
end
isapprox(A::AbstractMatrix, J::UniformScaling; kwargs...) = isapprox(J, A; kwargs...)

"""
copyto!(dest::AbstractMatrix, src::UniformScaling)
Copies a [`UniformScaling`](@ref) onto a matrix.
!!! compat "Julia 1.1"
In Julia 1.0 this method only supported a square destination matrix. Julia 1.1. added
support for a rectangular matrix.
"""
function copyto!(A::AbstractMatrix, J::UniformScaling)
@assert !has_offset_axes(A)
fill!(A, 0)

0 comments on commit 7d5ff0f

Please sign in to comment.
You can’t perform that action at this time.