Skip to content
Discussion options

You must be logged in to vote

You could use jnp.logical_and and friends, or their operator form like a & b. Do be aware of their precedence though, as they bind more tightly than comparison operators. So x > 10 and y > 10 should be (x > 10) & (y > 10), and the parentheses are not omittable.

Not so sure about the overhead part as I don't see any on my machine.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by jakevdp
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants