Got ArgumentError: Type must be isbitstype when code with MPI

Sorry, oftype was used incorrectly. I just edited my previous post.

Still, if you have an array of Union{Missing, Float64}, say

row = [3.0, 1.2, missing, 3.1]

then the above code (that I just edited) should give you a Vector{Float64}.

If you got an array of Real, it’s probably because your original data is not Float64, but a different subtype of Real such as Int, and then you’re mixing Ints and Float64s. In that case, you can try the following:

send_mesg = Float64[ismissing(x) ? NaN : x for x in row]
1 Like