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

behavior of all with multiple arguments #10271

Closed
jakebolewski opened this issue Feb 21, 2015 · 1 comment
Closed

behavior of all with multiple arguments #10271

jakebolewski opened this issue Feb 21, 2015 · 1 comment

Comments

@jakebolewski
Copy link
Member

all taking a predicate and more than one additional argument is not documented but currently allowed but has a really weird behavior which seems like a bug:

julia> all(i->(4<=i<=6), [4,5,6], [0,1,2])
1-element Array{Bool,1}:
 true

julia> all(i->(4<=i<=6), [4,5,6], [0,2,3])
3-element Array{Bool,1}:
 true
 true
 true

julia> all(i->(4<=i<=6), [4,5,6], [1])
1-element Array{Bool,1}:
 true

julia> all(i->(4<=i<=6), [4,5,6], [2])
3-element Array{Bool,1}:
 true
 true
 true

julia> all(i->(4<=i<=6), [4,5,6], 1)
1-element Array{Bool,1}:
 true

julia> all(i->(4<=i<=6), [4,5,6], 2)
3-element Array{Bool,1}:
 true
 true
 true

Shouldn't all behave similarly to map (additional arguments are passed to the predicate function)?

@JeffBezanson
Copy link
Member

I think that's one of those confusing "dimension" arguments, as in issues #4906 and #9439.

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

No branches or pull requests

2 participants