-
Notifications
You must be signed in to change notification settings - Fork 120
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
broken on julia 0.5 #145
Comments
Miles, I think I understand what's going on now.
At this point, I'm just looking to minimize collateral damage in the way we fix this issue. Madeleine |
Yes, it globally breaks julia: julia> a = [1,2,3];
julia> [a,1]
2-element Array{Any,1}:
[1,2,3]
1
julia> Base.vect(args...) = Base.vcat(args...)
WARNING: Method definition vect(Any...) in module Base at abstractarray.jl:24 overwritten in module Main at REPL[3]:1.
julia> [a,1]
4-element Array{Int64,1}:
1
2
3
1
|
What about making |
An excellent idea! The following seems to work (though I'm still getting an unrelated [I think] error):
|
Hm, no, not an unrelated error. The method isn't showing up correctly. Just to be safe, I've moved to the following function definition:
The error is
For comparison, the following code works, and returns functions of both types. I'm not sure what the difference is.
|
@tkelman , do you have any ideas how we can overload vect in Convex without clobbering vect in Base? I'm getting nervous with v0.5 around the corner, and the issue is well above my pay grade. |
@madeleineudell, using your definition above, I get:
Which makes very little sense. I think one needs to use Gallium here to figure out why a transpose atom is getting returned. |
Instead of using a function yo(args...)
if need_hack(typeof(args))
return println("yo, foo")
end
return println("yo")
end There will still be method overwrite warnings though. |
Miles, the reason it's returning transpose atom is that the code is lazy: On Aug 8, 2016 3:14 PM, "Yichao Yu" notifications@github.com wrote:
|
Fixed in #154 (I think) |
Convex.jl will be broken on 0.5 until some thought is put into the concatenation behavior and fixing this. Now
[1,2,3]
lowers toBase.vect(1,2,3)
instead ofvcat(1,2,3)
. I spent a bit of time trying to figure out a quick fix but couldn't come up with anything.The text was updated successfully, but these errors were encountered: