Skip to content

Commit 290f524

Browse files
committed
Add rmul!
Fixes #496
1 parent e40a5f3 commit 290f524

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -400,6 +400,8 @@ Currently, the `@compat` macro supports the following syntaxes:
400400

401401
* `LinSpace` is now `LinRange` ([#25896]).
402402

403+
* `scale!` is now `rmul!` ([#25571]).
404+
403405
* `isupper`, `islower`, `ucfirst` and `lcfirst` are now `isuppercase`, `islowercase`,
404406
`uppercasefirst` and `lowercasefirst` ([#26442]).
405407

src/Compat.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,6 +1842,13 @@ else
18421842
using LinearAlgebra: qr
18431843
end
18441844

1845+
if VERSION < v"0.7.0-DEV.3449"
1846+
const rmul! = Base.scale!
1847+
export rmul!
1848+
else
1849+
using LinearAlgebra: rmul!
1850+
end
1851+
18451852
include("deprecated.jl")
18461853

18471854
end # module Compat

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,4 +1727,6 @@ let A = [1 2; 1 2; 1 2]
17271727
@test f[1] * [f[2]; [0 0]] A[:,f[3]]
17281728
end
17291729

1730+
@test rmul!([1 2; 3 4], 2) [2 4; 6 8]
1731+
17301732
nothing

0 commit comments

Comments
 (0)