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
{{ message }}
This repository has been archived by the owner on May 4, 2019. It is now read-only.
I have come over a problem that depends on whether DataFrames decides that my column is of type Array{Union{Int64, Missings.Missing},1} or DataArrays.DataArray{Int64,1}. Dividing such arrays by an Int results in different element types in the resulting array. I can fix this by doing element-wise division, however, it seems to be unexpected behaviour to me?
In the below, y/minimum(y) results in an array with Anys, instead of Float64s as I expected.
That's due to Base.promote_op(/, eltype(y), eltype(y)) returning Any. Looks like we should call Missings.T before calling promote_op, and do Union{T, Missing} again on the result.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have come over a problem that depends on whether DataFrames decides that my column is of type
Array{Union{Int64, Missings.Missing},1}
orDataArrays.DataArray{Int64,1}
. Dividing such arrays by anInt
results in different element types in the resulting array. I can fix this by doing element-wise division, however, it seems to be unexpected behaviour to me?In the below,
y/minimum(y)
results in an array withAny
s, instead ofFloat64
s as I expected.The text was updated successfully, but these errors were encountered: