Skip to content

Commit e40eb13

Browse files
committed
Add token documentation for transpose.
1 parent 89f8170 commit e40eb13

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

base/linalg/adjtrans.jl

+25
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,31 @@ Transpose(A::Transpose) = A.parent
5454

5555
# wrapping lowercase quasi-constructors
5656
adjoint(A::AbstractVecOrMat) = Adjoint(A)
57+
"""
58+
transpose(A::AbstractMatrix)
59+
60+
Lazy matrix transpose. Mutating the returned object should appropriately mutate `A`. Often,
61+
but not always, yields `Transpose(A)`, where `Transpose` is a lazy transpose wrapper. Note
62+
that this operation is recursive.
63+
64+
This operation is intended for linear algebra usage - for general data manipulation see
65+
[`permutedims`](@ref), which is non-recursive.
66+
67+
# Examples
68+
```jldoctest
69+
julia> A = [1 2 3; 4 5 6; 7 8 9]
70+
3×3 Array{Int64,2}:
71+
1 2 3
72+
4 5 6
73+
7 8 9
74+
75+
julia> transpose(A)
76+
3×3 Transpose{Int64,Array{Int64,2}}:
77+
1 4 7
78+
2 5 8
79+
3 6 9
80+
```
81+
"""
5782
transpose(A::AbstractVecOrMat) = Transpose(A)
5883
# unwrapping lowercase quasi-constructors
5984
adjoint(A::Adjoint) = A.parent

0 commit comments

Comments
 (0)