Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

more small tests #139

wants to merge 1 commit into from

Conversation

kshyatt
Copy link
Contributor

@kshyatt kshyatt commented Jun 7, 2018

No description provided.

# setindex! for logical indices
AA = copy(A)
AA[vec(isodd.(A))] = 0.
@test AA[odd_inds] == zeros(odd_inds)
Copy link
Collaborator

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)]
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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!

Copy link
Contributor Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants