Skip to content

Commit

Permalink
News and compat annotation for JuliaLang#29782 (^(::Number, ::Abstrac…
Browse files Browse the repository at this point in the history
…tMatrix))
  • Loading branch information
mortenpi committed Dec 1, 2018
1 parent 39051de commit 263aac8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Standard library changes
* `copyto!(::AbstractMatrix, ::UniformScaling)` supports rectangular matrices now ([#28790]).
* In `put!(c::Channel{T}, v)`, `v` now gets converted to `T` as `put!` is being called ([#29092]).
* `current_project()` now also searched the parent directories of a Git repository for a `Project.toml` file. This also affects the behavior of the `--project` command line option when using the default `--project=@.` ([#29108]).
* Exponentiation operator `^` now supports raising a `Number` to an `AbstractMatrix` power ([#29782]).

Compiler/Runtime improvements
-----------------------------
Expand Down
3 changes: 3 additions & 0 deletions base/promotion.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ julia> A^3
37 54
81 118
```
!!! compat "Julia 1.1"
Julia 1.1. added support for raising a number to a matrix power using `^`.
"""
^(x::Number, y::Number) = ^(promote(x,y)...)

Expand Down

0 comments on commit 263aac8

Please sign in to comment.