Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove jldoctest setup for permutedims #56797

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions base/permuteddimsarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ julia> permutedims(A)
```
And `permutedims` produces results that differ from `transpose`
for matrices whose elements are themselves numeric matrices:
```jldoctest; setup = :(using LinearAlgebra)
```jldoctest
julia> a = [1 2; 3 4];

julia> b = [5 6; 7 8];
Expand All @@ -143,7 +143,7 @@ julia> permutedims(X)
[5 6; 7 8] [13 14; 15 16]

julia> transpose(X)
2×2 transpose(::Matrix{Matrix{Int64}}) with eltype Transpose{Int64, Matrix{Int64}}:
2×2 transpose(::Matrix{Matrix{Int64}}) with eltype LinearAlgebra.Transpose{Int64, Matrix{Int64}}:
[1 3; 2 4] [9 11; 10 12]
[5 7; 6 8] [13 15; 14 16]
```
Expand Down Expand Up @@ -220,7 +220,7 @@ For vectors of numbers, `permutedims(v)` works much like `transpose(v)`
except that the return type differs (it uses [`reshape`](@ref)
rather than a `LinearAlgebra.Transpose` view, though both
share memory with the original array `v`):
```jldoctest; setup = :(using LinearAlgebra)
```jldoctest
julia> v = [1, 2, 3, 4]
4-element Vector{Int64}:
1
Expand All @@ -240,7 +240,7 @@ julia> p == r
true

julia> typeof(r)
Transpose{Int64, Vector{Int64}}
LinearAlgebra.Transpose{Int64, Vector{Int64}}

julia> p[1] = 5; r[2] = 6; # mutating p or r also changes v

Expand All @@ -253,7 +253,7 @@ julia> v # shares memory with both p and r
```
However, `permutedims` produces results that differ from `transpose`
for vectors whose elements are themselves numeric matrices:
```jldoctest; setup = :(using LinearAlgebra)
```jldoctest
julia> V = [[[1 2; 3 4]]; [[5 6; 7 8]]]
2-element Vector{Matrix{Int64}}:
[1 2; 3 4]
Expand All @@ -264,7 +264,7 @@ julia> permutedims(V)
[1 2; 3 4] [5 6; 7 8]

julia> transpose(V)
1×2 transpose(::Vector{Matrix{Int64}}) with eltype Transpose{Int64, Matrix{Int64}}:
1×2 transpose(::Vector{Matrix{Int64}}) with eltype LinearAlgebra.Transpose{Int64, Matrix{Int64}}:
[1 3; 2 4] [5 7; 6 8]
```
"""
Expand Down
Loading