From 02cf36400b847b9a94a8ae2d526842ff42b38abc Mon Sep 17 00:00:00 2001 From: Kristoffer Carlsson Date: Wed, 17 Mar 2021 18:07:39 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"add=20'=E1=B5=80=20postfix=20operator?= =?UTF-8?q?=20for=20transpose=20(#38062)"=20(#40075)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 665279aedb18501938c934d46aa593a26a506b3e. (cherry picked from commit 7838e0973ba3183735cca6485a65ae9e708f0c1d) --- NEWS.md | 1 - base/exports.jl | 1 - base/operators.jl | 1 - stdlib/LinearAlgebra/src/adjtrans.jl | 12 ------------ test/operators.jl | 3 --- 5 files changed, 18 deletions(-) diff --git a/NEWS.md b/NEWS.md index ad41fb40a1876..0ce4a5cc458d5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -114,7 +114,6 @@ New library features inserting or consuming the first dimension depending on the ratio of `sizeof(T)` and `sizeof(S)`. * New `append!(vector, collections...)` and `prepend!(vector, collections...)` methods accept multiple collections to be appended or prepended ([#36227]). -* The postfix operator `'ᵀ` can now be used as an alias for `transpose` ([#38062]). * `keys(io::IO)` has been added, which returns all keys of `io` if `io` is an `IOContext` and an empty `Base.KeySet` otherwise ([#37753]). * `count` now accepts an optional `init` argument to control the accumulation type ([#37461]). diff --git a/base/exports.jl b/base/exports.jl index 0c157c45d2052..cedf0b1e48be2 100644 --- a/base/exports.jl +++ b/base/exports.jl @@ -467,7 +467,6 @@ export # linear algebra var"'", # to enable syntax a' for adjoint adjoint, - var"'ᵀ", transpose, kron, kron!, diff --git a/base/operators.jl b/base/operators.jl index d591b6254255a..8120e95913e3c 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -567,7 +567,6 @@ end function kron! end const var"'" = adjoint -const var"'ᵀ" = transpose """ \\(x, y) diff --git a/stdlib/LinearAlgebra/src/adjtrans.jl b/stdlib/LinearAlgebra/src/adjtrans.jl index c89da6d60141d..5710021f2772b 100644 --- a/stdlib/LinearAlgebra/src/adjtrans.jl +++ b/stdlib/LinearAlgebra/src/adjtrans.jl @@ -136,7 +136,6 @@ julia> x'x adjoint(A::AbstractVecOrMat) = Adjoint(A) """ - A'ᵀ transpose(A) Lazy transpose. Mutating the returned object should appropriately mutate `A`. Often, @@ -146,9 +145,6 @@ that this operation is recursive. This operation is intended for linear algebra usage - for general data manipulation see [`permutedims`](@ref Base.permutedims), which is non-recursive. -!!! compat "Julia 1.6" - The postfix operator `'ᵀ` requires Julia 1.6. - # Examples ```jldoctest julia> A = [3+2im 9+2im; 8+7im 4+6im] @@ -160,14 +156,6 @@ julia> transpose(A) 2×2 transpose(::Matrix{Complex{Int64}}) with eltype Complex{Int64}: 3+2im 8+7im 9+2im 4+6im - -julia> x = [3, 4im] -2-element Vector{Complex{Int64}}: - 3 + 0im - 0 + 4im - -julia> x'ᵀx --7 + 0im ``` """ transpose(A::AbstractVecOrMat) = Transpose(A) diff --git a/test/operators.jl b/test/operators.jl index fb884d52cbf98..1abfffaa09744 100644 --- a/test/operators.jl +++ b/test/operators.jl @@ -253,7 +253,4 @@ end @test ∋(0)(-2:2) end -a = rand(3, 3) -@test transpose(a) === a'ᵀ - @test [Base.afoldl(+, 1:i...) for i = 1:40] == [i * (i + 1) ÷ 2 for i = 1:40]