Skip to content

Commit 921563a

Browse files
committed
fix jldoctest failure
1 parent d89a4b3 commit 921563a

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

docs/src/pkgs/metadata/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ and the properties dictionary with `properties`:
6767
```jldoctest
6868
julia> properties(img)
6969
Dict{Symbol,Any} with 2 entries:
70-
:date => 2016-07-31
70+
:date => Date("2016-07-31")
7171
:time => "high noon"
7272
```
7373

docs/src/tutorials/conversions_views.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -486,22 +486,18 @@ UInt8` array representing an RGB movie (`t` being the time axis). To
486486
have it display as an RGB movie, you might create the following view of
487487
the array `A`:
488488

489-
```julia
490-
mov = colorview(RGB, normedview(PermutedDimsArray(A, (3,1,2,4))))
491-
```
492-
493-
If you show `mov` at the REPL, the `summary` prints like this:
494-
495-
```jldoctest; setup = :(using Images; A = rand(UInt8, 5, 6, 3, 10); mov = colorview(RGB, normedview(PermutedDimsArray(A, (3,1,2,4)))))
496-
julia> summary(mov)
497-
"5×6×10 reshape(reinterpret(RGB{N0f8}, normedview(N0f8, PermutedDimsArray(::Array{UInt8,4}, (3, 1, 2, 4)))), 5, 6, 10) with eltype RGB{Normed{UInt8,8}}"
489+
```@setup view
490+
using Images
491+
using Random
492+
Random.seed!(1234)
498493
```
499494

500-
which may be somewhat easier to read than the type:
495+
```@repl view
496+
A = rand(UInt8, 5, 6, 3, 10);
497+
mov = colorview(RGB, normedview(PermutedDimsArray(A, (3,1,2,4))));
501498
502-
```jldoctest; setup = :(using Images; A = rand(UInt8, 5, 6, 3, 10); mov = colorview(RGB, normedview(PermutedDimsArray(A, (3,1,2,4))))), filter=r"Symbol\(.*\)"
503-
julia> typeof(mov)
504-
Base.ReshapedArray{RGB{Normed{UInt8,8}},3,Base.ReinterpretArray{RGB{Normed{UInt8,8}},4,Normed{UInt8,8},MappedArrays.MappedArray{Normed{UInt8,8},4,PermutedDimsArray{UInt8,4,(3, 1, 2, 4),(2, 3, 1, 4),Array{UInt8,4}},ImageCore.var"#37#38"{Normed{UInt8,8}},typeof(reinterpret)}},Tuple{Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64},Base.MultiplicativeInverses.SignedMultiplicativeInverse{Int64}}}
499+
summary(mov)
500+
typeof(mov)
505501
```
506502

507503
While there is little or no performance cost to making use of

0 commit comments

Comments
 (0)