@@ -16,10 +16,10 @@ A = rand(5,4,3)
16
16
@test checkbounds (Bool, A, 2 , 2 , 2 , 1 ) == true # extra indices
17
17
@test checkbounds (Bool, A, 2 , 2 , 2 , 2 ) == false
18
18
@test checkbounds (Bool, A, 1 , 1 ) == true # partial linear indexing (PLI)
19
- # @test checkbounds(Bool, A, 1, 12) == true # PLI
20
- # @test checkbounds(Bool, A, 5, 12) == true # PLI
19
+ # @test checkbounds(Bool, A, 1, 12) == false # PLI TODO : Re-enable after partial linear indexing deprecation
20
+ # @test checkbounds(Bool, A, 5, 12) == false # PLI TODO : Re-enable after partial linear indexing deprecation
21
21
@test checkbounds (Bool, A, 1 , 13 ) == false # PLI
22
- # @test checkbounds(Bool, A, 6, 12) == false # PLI
22
+ # @test checkbounds(Bool, A, 6, 12) == false # PLI TODO : Re-enable after partial linear indexing deprecation
23
23
24
24
# single CartesianIndex
25
25
@test checkbounds (Bool, A, CartesianIndex ((1 , 1 , 1 ))) == true
@@ -31,15 +31,15 @@ A = rand(5,4,3)
31
31
@test checkbounds (Bool, A, CartesianIndex ((5 , 5 , 3 ))) == false
32
32
@test checkbounds (Bool, A, CartesianIndex ((5 , 4 , 4 ))) == false
33
33
@test checkbounds (Bool, A, CartesianIndex ((1 ,))) == true
34
- # @test checkbounds(Bool, A, CartesianIndex((60,))) == true
34
+ # @test checkbounds(Bool, A, CartesianIndex((60,))) == false # TODO : Re-enable after partial linear indexing deprecation
35
35
@test checkbounds (Bool, A, CartesianIndex ((61 ,))) == false
36
36
@test checkbounds (Bool, A, CartesianIndex ((2 , 2 , 2 , 1 ,))) == true
37
37
@test checkbounds (Bool, A, CartesianIndex ((2 , 2 , 2 , 2 ,))) == false
38
38
@test checkbounds (Bool, A, CartesianIndex ((1 , 1 ,))) == true
39
- # @test checkbounds(Bool, A, CartesianIndex((1, 12,))) == true
40
- # @test checkbounds(Bool, A, CartesianIndex((5, 12,))) == true
39
+ # @test checkbounds(Bool, A, CartesianIndex((1, 12,))) == false # TODO : Re-enable after partial linear indexing deprecation
40
+ # @test checkbounds(Bool, A, CartesianIndex((5, 12,))) == false # TODO : Re-enable after partial linear indexing deprecation
41
41
@test checkbounds (Bool, A, CartesianIndex ((1 , 13 ,))) == false
42
- # @test checkbounds(Bool, A, CartesianIndex((6, 12,))) == false
42
+ # @test checkbounds(Bool, A, CartesianIndex((6, 12,))) == false # TODO : Re-enable after partial linear indexing deprecation
43
43
44
44
# mix of CartesianIndex and Int
45
45
@test checkbounds (Bool, A, CartesianIndex ((1 ,)), 1 , CartesianIndex ((1 ,))) == true
@@ -64,9 +64,9 @@ A = rand(5,4,3)
64
64
@test checkbounds (Bool, A, 2 , 2 , 2 , 1 : 1 ) == true # extra indices
65
65
@test checkbounds (Bool, A, 2 , 2 , 2 , 1 : 2 ) == false
66
66
@test checkbounds (Bool, A, 1 : 5 , 1 : 4 ) == true
67
- # @test checkbounds(Bool, A, 1:5, 1:12) == true
67
+ # @test checkbounds(Bool, A, 1:5, 1:12) == false # TODO : Re-enable after partial linear indexing deprecation
68
68
@test checkbounds (Bool, A, 1 : 5 , 1 : 13 ) == false
69
- # @test checkbounds(Bool, A, 1:6, 1:12) == false
69
+ # @test checkbounds(Bool, A, 1:6, 1:12) == false # TODO : Re-enable after partial linear indexing deprecation
70
70
71
71
# logical
72
72
@test checkbounds (Bool, A, trues (5 ), trues (4 ), trues (3 )) == true
@@ -77,9 +77,9 @@ A = rand(5,4,3)
77
77
@test checkbounds (Bool, A, trues (61 )) == false
78
78
@test checkbounds (Bool, A, 2 , 2 , 2 , trues (1 )) == true # extra indices
79
79
@test checkbounds (Bool, A, 2 , 2 , 2 , trues (2 )) == false
80
- # @test checkbounds(Bool, A, trues(5), trues(12)) == true
80
+ # @test checkbounds(Bool, A, trues(5), trues(12)) == false # TODO : Re-enable after partial linear indexing deprecation
81
81
@test checkbounds (Bool, A, trues (5 ), trues (13 )) == false
82
- # @test checkbounds(Bool, A, trues(6), trues(12)) == false
82
+ # @test checkbounds(Bool, A, trues(6), trues(12)) == false # TODO : Re-enable after partial linear indexing deprecation
83
83
@test checkbounds (Bool, A, trues (5 , 4 , 3 )) == true
84
84
@test checkbounds (Bool, A, trues (5 , 4 , 2 )) == false
85
85
@test checkbounds (Bool, A, trues (5 , 12 )) == false
@@ -358,8 +358,8 @@ function test_vector_indexing{T}(::Type{T}, shape, ::Type{TestAbstractArray})
358
358
@test B[vec (idxs)] == A[vec (idxs)] == vec (idxs)
359
359
@test B[:] == A[:] == collect (1 : N)
360
360
@test B[1 : end ] == A[1 : end ] == collect (1 : N)
361
- # @test B[:,:] == A[:,:] == reshape(1:N, shape[1], prod(shape[2:end]))
362
- # @test B[1:end,1:end] == A[1:end,1:end] == reshape(1:N, shape[1], prod(shape[2:end]))
361
+ # @test B[:,:] == A[:,:] == reshape(1:N, shape[1], prod(shape[2:end])) # TODO : Re-enable after partial linear indexing deprecation
362
+ # @test B[1:end,1:end] == A[1:end,1:end] == reshape(1:N, shape[1], prod(shape[2:end])) # TODO : Re-enable after partial linear indexing deprecation
363
363
# Test with containers that aren't Int[]
364
364
@test B[[]] == A[[]] == []
365
365
@test B[convert (Array{Any}, idxs)] == A[convert (Array{Any}, idxs)] == idxs
@@ -373,7 +373,7 @@ function test_vector_indexing{T}(::Type{T}, shape, ::Type{TestAbstractArray})
373
373
# test removing dimensions with 0-d arrays
374
374
idx0 = reshape ([rand (1 : size (A, 1 ))])
375
375
@test B[idx0, idx2] == A[idx0, idx2] == reshape (A[idx0[], vec (idx2)], 4 , 5 ) == reshape (B[idx0[], vec (idx2)], 4 , 5 )
376
- # @test B[reshape([end]), reshape([end])] == A[reshape([end]), reshape([end])] == reshape([A[end,end]]) == reshape([B[end,end]])
376
+ # @test B[reshape([end]), reshape([end])] == A[reshape([end]), reshape([end])] == reshape([A[end,end]]) == reshape([B[end,end]]) # TODO : Re-enable after partial linear indexing deprecation
377
377
378
378
# test logical indexing
379
379
mask = bitrand (shape)
0 commit comments