-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Missing convert(Vector, ::SubArray)
#16519
Comments
Doesn't work on 0.5 either. |
This may be a stupid question, but should This code does work (v0.4): convert(Vector{Int}, slice(collect(1:10), 2:4))
So does convert(Vector{Float64}, slice(collect(1:10), 2:4))
Then again, if it works with EDIT: copied wrong code at first |
Having convert{T}(::Type{Vector}, A::AbstractVector{T}) = convert(Vector{T}, A) just after this line should do the trick? And if so, might as well add convert{T}(::Type{Matrix}, A::AbstractMatrix{T}) = convert(Matrix{T}, A) in the process? Or perhaps a more generic solution exists? Best! |
it can't go in abstractarray.jl because it will make compilation fail. array.jl seems like the best place. I am investigating |
Good call, array.jl sounds like the best place. Best! |
Fixed in master by #17848. Waiting for backport to 0.5. |
On 0.4:
is not defined, while
convert(Array, slice(...))
is. I don't have 0.5 yet - please close if it's fixed there.The text was updated successfully, but these errors were encountered: