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
The nil's are replaced with zeros. However, if
data.map {|v| v.to_i} is changed to say:
data.map {|v| v.try(:to_int)} the nils are preserved in the Rserve::REXP::Integer.new but the assignment will fail due to calling Protocol.set_int with a non-integer.
I noticed this inconsistent behavior:
It seems int vectors lose nulls and double vectors keep them. This is due to:
https://github.com/clbustos/Rserve-Ruby-client/blob/master/lib/rserve/rexp/integer.rb#L14
Since nil.to_i == 0 this will wipe out nulls.
The text was updated successfully, but these errors were encountered: