Skip to content

Commit

Permalink
Add test for SubArray logical indexing
Browse files Browse the repository at this point in the history
  • Loading branch information
magistere committed Nov 10, 2013
1 parent a0ea166 commit 7b42782
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/arrayops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,11 @@ sA = sub(A, 1:2:3, 1:3:5, 1:2:8)
@test strides(sA) == (2,9,30)
@test sA[:] == A[1:2:3, 1:3:5, 1:2:8][:]

# sub logical indexing #4763
A = sub([1:10], 5:8)
idx = map(x -> x < 7, A)
@test A[idx] == [5, 6]

# slice
A = reshape(1:120, 3, 5, 8)
sA = slice(A, 2, :, 1:8)
Expand Down

0 comments on commit 7b42782

Please sign in to comment.