-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more small tests #139
base: master
Are you sure you want to change the base?
more small tests #139
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,11 @@ odd_inds = collect(1:2:length(A)) | |
@test axes(A[vec(trues(A))]) == axes(A[all_inds]) | ||
@test @inferred(A[vec(isodd.(A))]) == A[1:2:length(A)] == A[odd_inds] | ||
@test axes(A[vec(isodd.(A))]) == axes(A[odd_inds]) | ||
|
||
# setindex! for logical indices | ||
AA = copy(A) | ||
AA[vec(isodd.(A))] = 0. | ||
@test AA[odd_inds] == zeros(odd_inds) | ||
@test AA[2:2:length(AA)] == A[2:2:length(AA)] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What are you testing here? Did you mean to do: AA[odd_inds] == A[2:2:length(AA)] or something like that? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, I'm checking that the even indexed items weren't modified. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh wow, sorry, I totally misread the second line! There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No worries haha I absolutely cannot throw stones in this regard! |
||
|
||
B = AxisArray(reshape(1:15, 5,3), .1:.1:0.5, [:a, :b, :c]) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this method of
zeros
is deprecated