Skip to content

Interaction between compact broadcast syntax and splatting? #17304

Closed
@Sacha0

Description

@Sacha0

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions