File tree Expand file tree Collapse file tree 5 files changed +18
-0
lines changed Expand file tree Collapse file tree 5 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -106,6 +106,7 @@ New library features
106
106
inserting or consuming the first dimension depending on the ratio of ` sizeof(T) ` and ` sizeof(S) ` .
107
107
* New ` append!(vector, collections...) ` and ` prepend!(vector, collections...) ` methods accept multiple
108
108
collections to be appended or prepended ([ #36227 ] ).
109
+ * The postfix operator ` 'ᵀ ` can now be used as an alias for ` transpose ` ([ #38043 ] ).
109
110
110
111
Standard library changes
111
112
------------------------
Original file line number Diff line number Diff line change @@ -466,6 +466,7 @@ export
466
466
# linear algebra
467
467
var"'" , # to enable syntax a' for adjoint
468
468
adjoint,
469
+ var"'ᵀ" ,
469
470
transpose,
470
471
kron,
471
472
kron!,
Original file line number Diff line number Diff line change 547
547
function kron! end
548
548
549
549
const var"'" = adjoint
550
+ const var"'ᵀ" = transpose
550
551
551
552
"""
552
553
\\ (x, y)
Original file line number Diff line number Diff line change @@ -136,6 +136,7 @@ julia> x'x
136
136
adjoint (A:: AbstractVecOrMat ) = Adjoint (A)
137
137
138
138
"""
139
+ A'ᵀ
139
140
transpose(A)
140
141
141
142
Lazy transpose. Mutating the returned object should appropriately mutate `A`. Often,
@@ -145,6 +146,9 @@ that this operation is recursive.
145
146
This operation is intended for linear algebra usage - for general data manipulation see
146
147
[`permutedims`](@ref Base.permutedims), which is non-recursive.
147
148
149
+ !!! compat "Julia 1.6"
150
+ The postfix operator `'ᵀ` requires Julia 1.6.
151
+
148
152
# Examples
149
153
```jldoctest
150
154
julia> A = [3+2im 9+2im; 8+7im 4+6im]
@@ -156,6 +160,14 @@ julia> transpose(A)
156
160
2×2 Transpose{Complex{Int64}, Matrix{Complex{Int64}}}:
157
161
3+2im 8+7im
158
162
9+2im 4+6im
163
+
164
+ julia> x = [3, 4im]
165
+ 2-element Vector{Complex{Int64}}:
166
+ 3 + 0im
167
+ 0 + 4im
168
+
169
+ julia> x'ᵀx
170
+ -7 + 0im
159
171
```
160
172
"""
161
173
transpose (A:: AbstractVecOrMat ) = Transpose (A)
Original file line number Diff line number Diff line change 243
243
@test gt5 (6 ) && ! gt5 (5 )
244
244
@test lt5 (4 ) && ! lt5 (5 )
245
245
end
246
+
247
+ a = rand (3 , 3 )
248
+ @test transpose (a) === a' ᵀ
You can’t perform that action at this time.
0 commit comments