-
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
Conversation
# setindex! for logical indices | ||
AA = copy(A) | ||
AA[vec(isodd.(A))] = 0. | ||
@test AA[odd_inds] == zeros(odd_inds) |
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
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 comment
The 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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
No worries haha I absolutely cannot throw stones in this regard!
No description provided.