You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure if this is fixed on master, but on 0.4.3:
function ff()
gg(x,y)=1.0*(x==y)
xx=[(i,i) for i=1:2]
yy=xx'
broadcast(gg,xx,yy)
end
ff()
> ERROR: LoadError: MethodError: `convert` has no method matching
> convert(::Type{Tuple{Int64,Int64}}, ::Float64)
The text was updated successfully, but these errors were encountered:
Duplicate of #16164 (or vice versa), since the type computation in map works but in broadcast doesn't. Still a problem in master:
julia> xx=[(i,i) for i=1:2];
julia> map(x -> x[1] == x[2], xx)
2-element Array{Bool,1}:
true
true
julia> broadcast(x -> x[1] == x[2], xx)
ERROR: MethodError: Cannot `convert` an object of type Bool to an object of type Tuple{Int64,Int64}
This may have arisen from a call to the constructor Tuple{Int64,Int64}(...),
since type constructors fall back to convert methods.
[inlined code] from ./REPL[3]:1
in (::Base.Broadcast.#_F_#5)(::Array{Tuple{Int64,Int64},1}, ::Array{Tuple{Int64,Int64},1}) at ./broadcast.jl:175
in broadcast!(::Function, ::Array{Tuple{Int64,Int64},1}, ::Array{Tuple{Int64,Int64},1}) at ./broadcast.jl:213
[inlined code] from ./boot.jl:315
in broadcast(::Function, ::Array{Tuple{Int64,Int64},1}) at ./broadcast.jl:220
in eval(::Module, ::Any) at ./boot.jl:228
Not sure if this is fixed on master, but on 0.4.3:
The text was updated successfully, but these errors were encountered: