-
Notifications
You must be signed in to change notification settings - Fork 50
vcat
between Arrays and DataArrays
#130
Comments
This is because This also raises a concern. If you have: a::NullableVector{Float64}
b::Vector{Float64} Then is it okay if |
Promoting AbstractArrays might get tricky, especially if you include SubArrays, PooledDataArrays, and other yet-to-be-defined AbstractArrays. |
I just made |
Of possible interest is a proposed update to hcat/vcat in base: I can't tell if it includes container promotion. |
So far, it doesn't. It still depends on a call to |
I feel like we need a standard function in base, say Example of 1: This is not needed only in concatenation functions (hence the need for an exported function in Base): for example, to write a This looks pretty simple to me: just have as a fallback for promote_array_type{T1 <: AbstractArray, T2 <: AbstractArray}(x::Type{T1}, y::Type{T2}) = Array{promote_type(eltype(x), eltype(y))} And then special cases, e.g. for promote_array_type{T1 <: AbstractArray, T2 <: DataArray}(x::Type{T1}, y::Type{T2}) = DataArray{promote_type(eltype(x), eltype(y))} How does that sound? Am I missing something? |
The following seems broken:
Both forms call
vcat
defined in abstractarray.jl. Without theNA
, both forms work. Maybe the new Nullable approach will fix this.The text was updated successfully, but these errors were encountered: