Skip to content

Commit

Permalink
Fix the examples (#34615)
Browse files Browse the repository at this point in the history
"using Mmap" is needed on the REPL to execute the examples.
  • Loading branch information
Dictino authored Feb 3, 2020
1 parent af17bb6 commit 10f9531
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions stdlib/Mmap/src/Mmap.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ for use in [`Mmap.mmap`](@ref Mmap.mmap). Used by `SharedArray` for creating sha
# Examples
```jldoctest
julia> using Mmap
julia> anon = Mmap.Anonymous();
julia> isreadable(anon)
Expand Down Expand Up @@ -156,6 +158,7 @@ For example, the following code
```julia
# Create a file for mmapping
# (you could alternatively use mmap to do this step, too)
using Mmap
A = rand(1:20, 5, 30)
s = open("/tmp/mmap.bin", "w+")
# We'll write the dimensions of the array as the first two Ints in the file
Expand Down Expand Up @@ -259,6 +262,8 @@ the byte representation is different.
# Examples
```jldoctest
julia> using Mmap
julia> io = open("mmap.bin", "w+");
julia> B = Mmap.mmap(io, BitArray, (25,30000));
Expand Down

0 comments on commit 10f9531

Please sign in to comment.