Skip to content

Commit e31ce7e

Browse files
committed
make wrap private
1 parent 404ff8d commit e31ce7e

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

NEWS.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ New library functions
7070
* The new `isfull(c::Channel)` function can be used to check if `put!(c, some_value)` will block. ([#53159])
7171
* `waitany(tasks; throw=false)` and `waitall(tasks; failfast=false, throw=false)` which wait multiple tasks at once ([#53341]).
7272
* `uuid7()` creates an RFC 9652 compliant UUID with version 7 ([#54834]).
73-
* `wrap(Array, m::Union{MemoryRef{T}, Memory{T}}, dims)` is the safe counterpart to `unsafe_wrap` ([#52049]).
7473

7574
New library features
7675
--------------------

base/exports.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,6 @@ export
461461
vcat,
462462
vec,
463463
view,
464-
wrap,
465464
zeros,
466465

467466
# search, find, match and related functions

doc/src/base/arrays.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ Base.reshape
141141
Base.dropdims
142142
Base.vec
143143
Base.SubArray
144-
Base.wrap
145144
```
146145

147146
## Concatenation and permutation

test/arrayops.jl

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,20 +3222,20 @@ end
32223222
@testset "Wrapping Memory into Arrays" begin
32233223
mem = Memory{Int}(undef, 10) .= 1
32243224
memref = memoryref(mem)
3225-
@test_throws DimensionMismatch wrap(Array, mem, (10, 10))
3226-
@test wrap(Array, mem, (5,)) == ones(Int, 5)
3227-
@test wrap(Array, mem, 2) == ones(Int, 2)
3228-
@test wrap(Array, memref, 10) == ones(Int, 10)
3229-
@test wrap(Array, memref, (2,2,2)) == ones(Int,2,2,2)
3230-
@test wrap(Array, mem, (5, 2)) == ones(Int, 5, 2)
3225+
@test_throws DimensionMismatch Base.wrap(Array, mem, (10, 10))
3226+
@test Base.wrap(Array, mem, (5,)) == ones(Int, 5)
3227+
@test Base.wrap(Array, mem, 2) == ones(Int, 2)
3228+
@test Base.wrap(Array, memref, 10) == ones(Int, 10)
3229+
@test Base.wrap(Array, memref, (2,2,2)) == ones(Int,2,2,2)
3230+
@test Base.wrap(Array, mem, (5, 2)) == ones(Int, 5, 2)
32313231

32323232
memref2 = memoryref(mem, 3)
3233-
@test wrap(Array, memref2, (5,)) == ones(Int, 5)
3234-
@test wrap(Array, memref2, 2) == ones(Int, 2)
3235-
@test wrap(Array, memref2, (2,2,2)) == ones(Int,2,2,2)
3236-
@test wrap(Array, memref2, (3, 2)) == ones(Int, 3, 2)
3237-
@test_throws DimensionMismatch wrap(Array, memref2, 9)
3238-
@test_throws DimensionMismatch wrap(Array, memref2, 10)
3233+
@test Base.wrap(Array, memref2, (5,)) == ones(Int, 5)
3234+
@test Base.wrap(Array, memref2, 2) == ones(Int, 2)
3235+
@test Base.wrap(Array, memref2, (2,2,2)) == ones(Int,2,2,2)
3236+
@test Base.wrap(Array, memref2, (3, 2)) == ones(Int, 3, 2)
3237+
@test_throws DimensionMismatch Base.wrap(Array, memref2, 9)
3238+
@test_throws DimensionMismatch Base.wrap(Array, memref2, 10)
32393239
end
32403240

32413241
@testset "Memory size" begin

0 commit comments

Comments
 (0)