diff --git a/NEWS.md b/NEWS.md index 4e2cb48c14f62..302dd1693775f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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 ----------------------------- diff --git a/base/promotion.jl b/base/promotion.jl index 4eb80c1b68239..351cb2edf69a8 100644 --- a/base/promotion.jl +++ b/base/promotion.jl @@ -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)...)