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

Interaction between compact broadcast syntax and splatting? #17304

Closed
Sacha0 opened this issue Jul 6, 2016 · 1 comment
Closed

Interaction between compact broadcast syntax and splatting? #17304

Sacha0 opened this issue Jul 6, 2016 · 1 comment

Comments

@Sacha0
Copy link
Member

Sacha0 commented Jul 6, 2016

Ref. #17302, reduced from the last test in test/operators.jl.

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _' |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+5184 (2016-07-06 20:20 UTC)
 _/ |\__'_|_|_|\__'_|  |  master/8019433 (fork: 3413 commits, 205 days)
|__/                   |  x86_64-apple-darwin15.5.0

julia> foo = [[1,2,3],[4,5,6],[7,8,9]]
3-element Array{Array{Int64,1},1}:
 [1,2,3]
 [4,5,6]
 [7,8,9]

julia> broadcast(max, foo...)
3-element Array{Int64,1}:
 7
 8
 9

julia> max.(foo...)
ERROR: MethodError: no method matching indicesbehavior(::Core.#tuple)
Closest candidates are:
  indicesbehavior(::SubArray{T,N,P,I,L})
  indicesbehavior(::AbstractArray{T,N})
  indicesbehavior{T<:AbstractArray{T,N}}(::Type{T<:AbstractArray})
  ...
 in broadcast_shape(::Function, ::Array{Array{Int64,1},1}) at ./broadcast.jl:17
 in broadcast_t(::Function, ::Type{Any}, ::Function, ::Vararg{Any,N}) at ./broadcast.jl:179
 in broadcast(::Function, ::Function, ::Array{Array{Int64,1},1}) at ./broadcast.jl:197
 in eval(::Module, ::Any) at ./boot.jl:234
 in macro expansion at ./REPL.jl:92 [inlined]
 in (::Base.REPL.##1#2{Base.REPL.REPLBackend})() at ./event.jl:46
@stevengj
Copy link
Member

stevengj commented Jul 6, 2016

Probably a bug in #15032, I'll look into it.

stevengj added a commit to stevengj/julia that referenced this issue Jul 6, 2016
mfasi pushed a commit to mfasi/julia that referenced this issue Sep 5, 2016
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