From ac7ccd31ecadab62f8a425b38b04fdb79b289b1d Mon Sep 17 00:00:00 2001 From: KristofferC Date: Wed, 17 Mar 2021 08:52:03 +0100 Subject: [PATCH] =?UTF-8?q?Revert=20"add=20'=E1=B5=80=20postfix=20operator?= =?UTF-8?q?=20for=20transpose=20(#38062)"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 665279aedb18501938c934d46aa593a26a506b3e. --- HISTORY.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/HISTORY.md b/HISTORY.md index e61575be86ed1..c331f2e6168dd 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -113,7 +113,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 440b28fb155b2..adfb1772600d3 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 e5e82bf190ce2..010f5793fba06 100644 --- a/base/operators.jl +++ b/base/operators.jl @@ -624,7 +624,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 31d0443a39253..56942930d7aa7 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 d1b947ba6e8f2..070a924b41cdc 100644 --- a/test/operators.jl +++ b/test/operators.jl @@ -280,7 +280,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]