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

Implement Zip::all() #615

Merged
merged 2 commits into from Apr 25, 2019
Merged

Implement Zip::all() #615

merged 2 commits into from Apr 25, 2019

Conversation

mneumann
Copy link
Contributor

Test if every element of the iterator matches a predicate.

This is useful, for instance, to test if two matrices are elementwise
"similar" (within a given threshold) without modifying the matrices.false

Test if every element of the iterator matches a predicate.

This is useful, for instance, to test if two matrices are elementwise
"similar" (within a given threshold) without modifying the matrices.
Copy link
Member

@jturner314 jturner314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks useful. I've added a couple of comments. It would be nice to add an .any() method too, but that doesn't have to be part of this PR.

src/zip/mod.rs Show resolved Hide resolved
tests/azip.rs Show resolved Hide resolved
@jturner314
Copy link
Member

Once this is merged, I'll rewrite #581 in terms of .all().

Copy link
Member

@jturner314 jturner314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. I'll wait a little while for comments from anyone else and then merge this.

@LukeMathWalker
Copy link
Member

Happy to merge this @jturner314 👍

@jturner314
Copy link
Member

@LukeMathWalker Sure, please go ahead.

@LukeMathWalker LukeMathWalker merged commit 44bf8b8 into rust-ndarray:master Apr 25, 2019
@mneumann mneumann deleted the zip_all branch August 2, 2019 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants