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

element-wise max(a,b,c,d) does not work: "ordering is not well-defined for arrays" #13144

Closed
micklat opened this issue Sep 15, 2015 · 5 comments
Labels
kind:bug Indicates an unexpected problem or unintended behavior

Comments

@micklat
Copy link
Contributor

micklat commented Sep 15, 2015

I think that if max(a,b,c) is OK, then so should max(a,b,c,d) be. And yet:

julia> xs = [randn(3,4) for _ in 1:4];

julia> max(xs[1],xs[2],xs[3])
3x4 Array{Float64,2}:
 -0.134074   0.426187  0.493014  -0.122643
  1.22624    1.35207   0.879993   0.785643
  0.246837  -0.20105   1.417      0.091331

julia> max(xs[1],xs[2],xs[3],xs[4])
ERROR: ArgumentError: ordering is not well-defined for arrays
 in afoldl at operators.jl:83
 in max at operators.jl:97
@micklat
Copy link
Contributor Author

micklat commented Sep 15, 2015

would it help the project if I make a PR for some tests under julia/test/reduce.jl?

@JeffBezanson
Copy link
Sponsor Member

Ah, it's those f***ing functors again.

@pao
Copy link
Member

pao commented Sep 15, 2015

would it help the project if I make a PR for some tests under julia/test/reduce.jl?

Absolutely.

@JeffBezanson JeffBezanson added kind:bug Indicates an unexpected problem or unintended behavior backport pending 0.4 labels Sep 15, 2015
JeffBezanson added a commit that referenced this issue Sep 15, 2015
test that max() can take 4 or more array arguments (bug #13144)
JeffBezanson added a commit that referenced this issue Sep 16, 2015
tkelman pushed a commit that referenced this issue Sep 16, 2015
@tkelman
Copy link
Contributor

tkelman commented Sep 16, 2015

backported in #13107

@micklat
Copy link
Contributor Author

micklat commented Sep 16, 2015

great! thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

4 participants