Skip to content

Commit

Permalink
Revert "add 'ᵀ postfix operator for transpose (#38062)" (#40075)
Browse files Browse the repository at this point in the history
This reverts commit 665279a.
  • Loading branch information
KristofferC authored Mar 17, 2021
1 parent b633c29 commit 7838e09
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 18 deletions.
1 change: 0 additions & 1 deletion HISTORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]).
Expand Down
1 change: 0 additions & 1 deletion base/exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,6 @@ export
# linear algebra
var"'", # to enable syntax a' for adjoint
adjoint,
var"'ᵀ",
transpose,
kron,
kron!,
Expand Down
1 change: 0 additions & 1 deletion base/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ end
function kron! end

const var"'" = adjoint
const var"'ᵀ" = transpose

"""
\\(x, y)
Expand Down
12 changes: 0 additions & 12 deletions stdlib/LinearAlgebra/src/adjtrans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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]
Expand All @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions test/operators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]

0 comments on commit 7838e09

Please sign in to comment.